Fix mg_http_delete_chunk()

This commit is contained in:
Sergey Lyubka committed 2022-03-11 15:38:59 +00:00
1 parent 139f928731
commit 7bf8b81995
3 files changed
+3 -4

No files matched your search

-1
View File
@@ -872,7 +872,6 @@ void mg_http_delete_chunk(struct mg_connection *c, struct mg_http_message *hm) {
struct mg_str ch = hm->chunk;
const char *end = (char *) &c->recv.buf[c->recv.len], *ce;
bool chunked = mg_is_chunked(hm);
if (!mg_is_chunked(hm)) return;
if (chunked) {
ch.len += 4, ch.ptr -= 2; // \r\n before and after the chunk
while (ch.ptr > hm->body.ptr && *ch.ptr != '\n') ch.ptr--, ch.len++;