]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: flt-http-comp: Don't read next block to detect end of data
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Aug 2026 08:32:59 +0000 (10:32 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Aug 2026 12:26:56 +0000 (14:26 +0200)
commita1107f8de73365ba8f6fc9819d0ec3e02c5d1117
treead311b91142a3cc32fa25a47169cc2d8d3a48469
parentfa196bc1de290721d8cba67b56d83947e91739a5
BUG/MINOR: flt-http-comp: Don't read next block to detect end of data

During the compression, on a DATA block, the next blocks was tested to know
if the end of data was reached. However, it is not valid to do so because a
prior filter may have limited the data forwarding to the current block to
inject more DATA blocks later for instance. Because of this bug, we could
detect the end of the payload too early, hijacking this way processing of
prior filters.

This test was added as an optimization, to save a loop on the HTX
message. So it can be safely removed.

For now, it is not possible to hit the bug with in-house filters. But a lua
filter modifiying the payload could trigger it. And it will be an issue if
the compression filter is chained with the decompression one (once
added). So let's fix it now.

This patch must be backported to all supported versions.
src/flt_http_comp.c