]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: flt-http-comp: Block HTX_FL_EOM flag till the end of compression
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Aug 2026 10:02:58 +0000 (12:02 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 Aug 2026 12:26:56 +0000 (14:26 +0200)
commit30890fd90e036fa12741320e5205477097f3e333
tree917f524d8a8abfb5425e599ed3c0a81a3a89a2a0
parenta1107f8de73365ba8f6fc9819d0ec3e02c5d1117
BUG/MEDIUM: flt-http-comp: Block HTX_FL_EOM flag till the end of compression

Because the compression filter is generating a new payload and especially
because data may be blocked in its internal context, the EOM flag must be
removed from the HTX message and only set again at the end of the
compression.

It is important to be sure the end of message is not detected too early.
Indeed, it may happen if some data are blocked in the filter context but all
data in the message must be fully forwarded. In that case, we have a message
with no input at all and the EOM flag. It is the condition to consider the
end of the message was reached. This could lead to truncate the message.

To fix the issue, the compression filter now remove systematically the EOM
flag from the HTX message. But it save the information in its context,
thanks to the COMP_STATE_EOM_SEEN flag. This way, at the end of the
compression, it can set it again.

This patch could be backported to supported version. Not sure the bug was
ever been observed. But it is theorically possible.
src/flt_http_comp.c