Restore body size calculation and add comment

This commit is contained in:
Juliusz Sosinowicz
2026-03-11 12:46:22 +01:00
parent 5a4c63423b
commit c920d2882c
+4 -1
View File
@@ -571,8 +571,11 @@ static int ParseHttpRequest(const byte* httpReq, int httpReqSz,
return -1;
}
/* Use Content-Length if available, otherwise use remaining data */
if (*bodySz == 0) {
return -1;
/* TODO We should only enter here when "Connection-close"
* is present. There should be some checks to confirm that. */
*bodySz = httpReqSz - offset;
}
/* Ensure that the claimed body length fits in the received data */