Preserving _requestContent invariant in HTTPConnection class,

in the case when Content-Length header is empty, to avoid null
dereference in the requestContent() getter.
This commit is contained in:
namark 2021-11-05 00:16:59 +04:00
parent 61367ffd47
commit 7fac5dd8b8

View file

@ -338,6 +338,7 @@ void HTTPConnection::readHeaders() {
QByteArray clength = requestHeader("Content-Length");
if (clength.isEmpty()) {
_requestContent = MemoryStorage::make(0);
_parentManager->handleHTTPRequest(this, _requestUrl);
} else {