]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: flt-decomp: skip responses without a transfer length
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 2 Dec 2026 14:28:49 +0000 (15:28 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 2 Dec 2026 14:33:02 +0000 (15:33 +0100)
commite186c08fbcc741e214ff0d0d9cd4f2763e418597
tree399427687347ab74a4c16f62bb5cf59f7301e36b
parentdacf94cad5344e7ccf9f84e104bc6b0e46597ea0
BUG/MEDIUM: flt-decomp: skip responses without a transfer length

When a compressed response has neither a content-length nor a chunked
encoding, its end is only known when the server closes. In this case,
http_response_forward_body() ends the message as soon as the close is
reported and the filter is not called anymore, so the decompressed data
it could not emit yet were lost. The response was silently truncated,
e.g. 998006 bytes delivered out of 1MB, with nothing reported to the
client nor in the logs.

Let's not decompress such messages, like the compression filter already
does. They are forwarded untouched, with their content-encoding header,
including in "always" mode. The filter was introduced in 3.5-dev6, so no
backport is needed.
src/flt_decomp.c