BUG/MINOR: http-comp: Preserve HTTP_MSGF_COMPRESSIONG flag on the response
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 21 May 2021 07:49:20 +0000 (09:49 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:22:01 +0000 (15:22 +0200)
commita3e78a80d600188d036bc082eef83bc0899d6035
treed26c823f5cb1b20f4209ed88de184394fb33a8e5
parent088f378c436cd0075f04a7304b4c921fbcd3ea22
BUG/MINOR: http-comp: Preserve HTTP_MSGF_COMPRESSIONG flag on the response

This flag is set on the response when its payload is compressed by HAProxy.
It must be preserved because it may be used when the log message is emitted.

When the compression filter was refactored to support the HTX, an
optimization was added to not perform extra proessing on the trailers.
HTTP_MSGF_COMPRESSIONG flag is removed when the last data block is
compressed. It is not required, it is just an optimization and unfortunately
a bug. This optimization must be removed to preserve the flag.

This patch must be backported as far as 2.0. On the HTX is affected.

(cherry picked from commit acfd71b97aecea49bc3e3fad18d662960b750970)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 73f40e02b055f4fcc92fec9fe12e78034fde0260)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/flt_http_comp.c