mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 01:16:55 +02:00
PageCompiler: make session available before page precondition is checked - allows use of session in precondition
This commit is contained in:
parent
d550ff7af9
commit
f04e19a362
@ -263,11 +263,11 @@ void CodeWriter::writeHandler(std::ostream& ostr)
|
|||||||
ostr << "void " << _class << "::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)\n";
|
ostr << "void " << _class << "::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)\n";
|
||||||
ostr << "{\n";
|
ostr << "{\n";
|
||||||
writeResponse(ostr);
|
writeResponse(ostr);
|
||||||
|
writeSession(ostr);
|
||||||
if (_page.has("page.precondition"))
|
if (_page.has("page.precondition"))
|
||||||
{
|
{
|
||||||
ostr << "\tif (!(" << _page.get("page.precondition") << ")) return;\n\n";
|
ostr << "\tif (!(" << _page.get("page.precondition") << ")) return;\n\n";
|
||||||
}
|
}
|
||||||
writeSession(ostr);
|
|
||||||
writeForm(ostr);
|
writeForm(ostr);
|
||||||
ostr << _page.preHandler().str();
|
ostr << _page.preHandler().str();
|
||||||
writeContent(ostr);
|
writeContent(ostr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user