mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
This commit is contained in:
parent
6bcd02bb1c
commit
60e1b64455
@ -592,6 +592,13 @@ int mg_http_parse(const char *s, size_t len, struct mg_http_message *hm) {
|
||||
hm->message.len = req_len;
|
||||
}
|
||||
|
||||
// The 204 (No content) responses also have 0 body length
|
||||
if (hm->body.len == (size_t) ~0 && is_response &&
|
||||
mg_vcasecmp(&hm->uri, "204") == 0) {
|
||||
hm->body.len = 0;
|
||||
hm->message.len = req_len;
|
||||
}
|
||||
|
||||
return req_len;
|
||||
}
|
||||
|
||||
|
@ -193,6 +193,13 @@ int mg_http_parse(const char *s, size_t len, struct mg_http_message *hm) {
|
||||
hm->message.len = req_len;
|
||||
}
|
||||
|
||||
// The 204 (No content) responses also have 0 body length
|
||||
if (hm->body.len == (size_t) ~0 && is_response &&
|
||||
mg_vcasecmp(&hm->uri, "204") == 0) {
|
||||
hm->body.len = 0;
|
||||
hm->message.len = req_len;
|
||||
}
|
||||
|
||||
return req_len;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user