]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: flt-decomp: accept an empty payload
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 2 Dec 2026 14:30:37 +0000 (15:30 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 2 Dec 2026 14:33:02 +0000 (15:33 +0100)
commitbab358badfc0f47a33df2d100bcda45ea3b125b4
treef5ff90d9df8de8a3a55bf4cf8b379151268efc7e
parente186c08fbcc741e214ff0d0d9cd4f2763e418597
BUG/MEDIUM: flt-decomp: accept an empty payload

Some servers announce a content-encoding on a message with an empty
payload, e.g. a chunked response with only the last chunk. No data are
passed to the decoder in this case, so it never reports the end of the
compressed stream: the end of the message was held forever, and since
truncated payloads are detected, it was reported as an error.

Now the filter remembers when payload data were received. When the end
of the payload is reached without any, there is nothing to decompress
and the decompression is considered as finished, so the empty message is
forwarded. The filter was introduced in 3.5-dev6, so no backport is
needed.
src/flt_decomp.c