significant work on cookies and cgi formdata variables.

This commit is contained in:
Brad Arant committed 2025-03-18 16:46:39 -07:00
1 parent 050b5f2b87
commit 078ba7f81c
3 files changed
+10 -12

No files matched your search

+3 -11
View File
@@ -9,13 +9,10 @@ namespace jet {
__jet::__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) {
char *cookies;
std::cout << "010" << std::endl;
if(keywordDefined("cgi") && (resolveKeyword("cgi") == "true")) {
std::cout << "011" << std::endl;
global.cgi = true;
if(keywordDefined("sessiondir")) {
std::cout << "012" << std::endl;
global.cookies = getenv("HTTP_COOKIE");
global.session = true;
// if request_has_cookie then
@@ -43,19 +40,14 @@ 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;
}
if(contentType == "multipart/form-data")
coreutils::IMFMultipart postdata(0, "");
// else if(contentType == "application/x-www-form-urlencoded")
// global.setupFormURLEncoded(postdata);
}