Commit d6ba37dc authored by Alexander Alashkin's avatar Alexander Alashkin Committed by Cesanta Bot

Correct msg len for chunked encoding

Close cesanta/dev#6485

PUBLISHED_FROM=172ab4f18f1fb3e6110ad03eea18a7f87f2e531a
parent a58d21aa
......@@ -5338,7 +5338,9 @@ MG_INTERNAL size_t mg_handle_chunked(struct mg_connection *nc,
}
if (zero_chunk_received) {
hm->message.len = (size_t) pd->chunk.body_len + blen - i;
/* Total message size is len(body) + len(headers) */
hm->message.len =
(size_t) pd->chunk.body_len + blen - i + (hm->body.p - hm->message.p);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment