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.
This commit is contained in:
Christopher Faulet 2025-09-18 08:00:26 +02:00
parent c0b6db2830
commit c9bc18c0bf

View File

@ -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;