some cgi variable work.

This commit is contained in:
brad Arant committed 2024-11-23 19:25:14 -08:00
1 parent 64fd81d6ed
commit c21dea1411
5 files changed
+66 -30

No files matched your search

+8 -7
View File
@@ -1,6 +1,7 @@
#include "__jet.h"
#include "Exception.h"
#include <iostream>
#include <fstream>
namespace jet {
@@ -13,17 +14,17 @@ namespace jet {
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
std::ofstream outFile("/tmp/output.txt");
coreutils::MString postdata;
postdata.read(0);
std::cout << postdata << std::endl;
coreutils::IMFRequest request(postdata);
coreutils::IMFMessage message(postdata);
outFile << postdata << std::endl;
outFile.close();
if(contentType == "multipart/form-data")
std::cout << "output multipart variables to global" << std::endl;
else if(contentType == "application/x-www-form-urlencoded")
std::cout << "output urlencoded variables to global" << std::endl;
global.setupFormData(postdata);
// else if(contentType == "application/x-www-form-urlencoded")
// std::cout << "output urlencoded variables to global" << std::endl;
}
}
processContainer(container);