Still working out cgi variable stuff.
This commit is contained in:
parent
e6ebb34366
commit
d0f2551e89
13
Tag.cpp
13
Tag.cpp
@ -407,11 +407,14 @@ namespace jet {
|
|||||||
else
|
else
|
||||||
return parent->keywords[name];
|
return parent->keywords[name];
|
||||||
} else if(variable.ifNext(":")) {
|
} else if(variable.ifNext(":")) {
|
||||||
renderVariableName(variable, name, modifier);
|
if(global.cgi) {
|
||||||
if(name.find(":") == -1) {
|
renderVariableName(variable, name, modifier);
|
||||||
name << ":0";
|
if(name.find(":") == -1) {
|
||||||
}
|
name << ":0";
|
||||||
return processModifier(global.cgiData[name], modifier);
|
}
|
||||||
|
return processModifier(global.cgiData[name], modifier);
|
||||||
|
} else
|
||||||
|
throw coreutils::Exception("cgi variable only allowed in cgi mode.");
|
||||||
} else if(variable.ifNext("@")) {
|
} else if(variable.ifNext("@")) {
|
||||||
// TODO: should only allow session variables. Allow substitution.
|
// TODO: should only allow session variables. Allow substitution.
|
||||||
} else if(variable.ifNext("%")) {
|
} else if(variable.ifNext("%")) {
|
||||||
|
|||||||
@ -35,8 +35,9 @@ namespace jet {
|
|||||||
if(requestMethod == "POST") {
|
if(requestMethod == "POST") {
|
||||||
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
|
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
|
||||||
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
|
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);
|
processContainer(container, NULL, true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user