fix 411 not draining header data

This commit is contained in:
Sergio R. Caprile committed 2024-07-01 14:38:27 -03:00
1 parent bdfa0b302b
commit be8dbb0dc7
3 files changed
+9 -1

No files matched your search

+1
View File
@@ -1042,6 +1042,7 @@ static void http_cb(struct mg_connection *c, int ev, void *ev_data) {
// contain a Content-length header. Other requests can also contain a
// body, but their content has no defined semantics (RFC 7231)
require_content_len = true;
ofs += (size_t) n; // this request has been processed
} else if (is_response) {
// HTTP spec 7.2 Entity body: All other responses must include a body
// or Content-Length header field defined with a value of 0.