add: url decode, and change client_body_size var to ssize_t

This commit is contained in:
Talyx
2022-02-14 17:34:01 +03:00
parent cec4ae69e1
commit b1a1404863
7 changed files with 40 additions and 17 deletions

View File

@@ -153,7 +153,7 @@ void CgiHandle::initEnvVariables()
_variable["AUTH TYPE"] = it->second;
else
_variable["AUTH TYPE"] = "";
_variable["CONTENT_LENGTH"] = toString(_request.getContentLength());
_variable["CONTENT_LENGTH"] = toString(_request.getBody().size());
it = _request.getClientFields().find("content-type");
_variable["CONTENT_TYPE"] = "";
_variable["GATEWAY_INTERFACE"] = std::string("CGI/1.1");