]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: compression: Test payload size only if content-length is specified
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 18 Sep 2025 07:08:11 +0000 (09:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Sep 2025 08:16:53 +0000 (10:16 +0200)
commit23e5d272af1b3125338c7ff45d0941d716f13a55
treeab172f322da0924db8173925c8efdb1d8e78db1e
parent71199e394c5e63fda7070cd7ae5b4b691411259d
BUG/MINOR: compression: Test payload size only if content-length is specified

When a minimum size is defined to performe the comression, the message
payload size is tested. To do so, information from the HTX message a used to
determine the message length. However it is performed regardless the payload
length is fully known or not. Concretely, the test must on be performed when
a content-length value was speficied or when the message was fully received
(EOM flag set). Otherwise, we are unable to really determine the real
payload length.

Because of this bug, compression may be skipped for a large chunked message
because the first chunks received are too small. But this does not mean the
whole message is small.

This patch must be backported to 3.2.
src/flt_http_comp.c