Still working out cgi variable stuff.

This commit is contained in:
Brad Arant committed 2025-12-10 16:48:23 -08:00
1 parent e6ebb34366
commit d0f2551e89
2 files changed
+10 -6

No files matched your search

+8 -5
View File
@@ -407,11 +407,14 @@ namespace jet {
else
return parent->keywords[name];
} else if(variable.ifNext(":")) {
renderVariableName(variable, name, modifier);
if(name.find(":") == -1) {
name << ":0";
}
return processModifier(global.cgiData[name], modifier);
if(global.cgi) {
renderVariableName(variable, name, modifier);
if(name.find(":") == -1) {
name << ":0";
}
return processModifier(global.cgiData[name], modifier);
} else
throw coreutils::Exception("cgi variable only allowed in cgi mode.");
} else if(variable.ifNext("@")) {
// TODO: should only allow session variables. Allow substitution.
} else if(variable.ifNext("%")) {
+2 -1
View File
@@ -35,8 +35,9 @@ namespace jet {
if(requestMethod == "POST") {
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
ZString boundary = "xxxx";
global.cgiData = new coreutils::CGIFormData(0, contentType, contentLength, boundary);
global.cgiData = new coreutils::CGIFormData(0, contentType, contentLength.asInteger(), boundary);
}
}
processContainer(container, NULL, true);