Work on the CGI handling.

This commit is contained in:
Brad Arant committed 2024-11-11 15:59:42 -08:00
1 parent 496b90a680
commit 39f5936787
5 files changed
+41 -2

No files matched your search

+9 -2
View File
@@ -5,14 +5,21 @@
namespace jet {
__jet::__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
if(variables["cgi"] == "true") {
if(variableDefined("cgi"))
resolveKeyword("cgi");
if(variables["cgi"] == "true") {
coreutils::ZString requestMethod(getenv("REQUEST_METHOD"));
if(requestMethod == "POST") {
coreutils::ZString contentLength(getenv("CONTENT_LENGTH"));
coreutils::ZString contentType(getenv("CONTENT_TYPE"));
coreutils::MString postdata;
postdata.read(0);
std::cout << postdata << std::endl;
coreutils::IMFRequest request(postdata);
coreutils::IMFMessage message(postdata);
if(contentType == "multipart/form-data")