add: limit from body size

This commit is contained in:
Talyx
2022-02-10 22:13:38 +03:00
parent b178c3c8bf
commit e7373ce4e9
3 changed files with 16 additions and 7 deletions

View File

@@ -196,7 +196,8 @@ void Request::splitData(std::string &data)
_head_ok = true;
parseHeader();
if (_contentLength == 0 && !_chunked)
if ((_contentLength == 0 && !_chunked) || (_method == "GET"
|| _method == "DELETE" || _method == "HEAD"))
_body_ok = true;
}
}