mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-11 17:04:33 +07:00
Fix bug in long HTTP chunk handling
Due to a copy/paste error, the start of the payload in the latest parsed chunk was compared to chunk-length of the terminating chunk (5 chars). So only chunks were parsed as expected, which also had a single hex digit length.
This commit is contained in:
+1
-1
@@ -990,7 +990,7 @@ static void walkchunks(struct mg_connection *c, struct mg_http_message *hm,
|
||||
char *buf2 = (char *) &c->recv.buf[reqlen];
|
||||
size_t memo2 = c->recv.len;
|
||||
size_t cl2 = get_chunk_length(&buf2[off], memo2 - reqlen - off, &ll);
|
||||
size_t n = cl < ll + 2 ? 0 : cl2 - ll - 2;
|
||||
size_t n = cl2 < ll + 2 ? 0 : cl2 - ll - 2;
|
||||
memmove(buf2 + bl, buf2 + off + ll, n);
|
||||
bl += n;
|
||||
off += cl2;
|
||||
|
||||
Reference in New Issue
Block a user