more formdata work.

This commit is contained in:
Brad Arant 2025-03-17 16:46:50 -07:00
parent d3cd5f3c9a
commit 050b5f2b87
3 changed files with 6 additions and 5 deletions

View File

@ -26,7 +26,6 @@ namespace jet {
void setupFormURLEncoded(coreutils::ZString &formdata);
char *errorCursor = NULL;
coreutils::CGIFormattedData cookies;
std::map<coreutils::MString, coreutils::MString> variables;
std::map<coreutils::MString, coreutils::MString> cgiVariables;

View File

@ -43,17 +43,19 @@ namespace jet {
}
std::cout << "013" << std::endl;
coreutils::ZString requestMethod(getenv("REQUEST_METHOD"));
if(requestMethod == "POST") {
std::cout << "014: " << requestMethod << std::endl;
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
if(contentType == "multipart/form-data") {
std::cout << "015" << std::endl;
coreutils::IMFMultipart postdata(0, contentLength.asInteger());
std::cout << "016" << std::endl;
}
}
// else if(contentType == "application/x-www-form-urlencoded")
// global.setupFormURLEncoded(postdata);
}

View File

@ -1,6 +1,6 @@
#!../jet-2.0
<upload name="imagefiledata" path="images/%name" />
<jet sessiondir=".">
<jet cgi="true" sessiondir=".">
<dump file="./dump.txt" />
</jet>