From c9bc18c0bf897e64d84e3b757b3ac04da13c36e6 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 18 Sep 2025 08:00:26 +0200 Subject: [PATCH] MINOR: h1-htx: Increment body len when parsing a payload with no xfer length In the H1 parseur, the body length was only incremented when the transfer length was known. So when the content-length was specified or when the transfer-encoding value was set to "chunk". Now for messages with unknown transfer length, it is also incremented. It is mandatory to be able to remove the extra field from the HTX message. --- src/h1_htx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/h1_htx.c b/src/h1_htx.c index 83e241e53..4da1896c3 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -908,6 +908,7 @@ size_t h1_parse_msg_data(struct h1m *h1m, struct htx **dsthtx, sz = b_data(srcbuf) - ofs; sz = h1_copy_msg_data(dsthtx, srcbuf, ofs, sz, max, htxbuf); total += sz; + h1m->body_len += sz; } return total;