From: Olivier Houchard Date: Wed, 2 Dec 2026 13:47:18 +0000 (+0100) Subject: BUG/MEDIUM: compression: finish the stream on a NOOP block with EOM X-Git-Tag: v3.5.0~12 X-Git-Url: https://git.kaiwu.me/web/ngx_http_log_module.html?a=commitdiff_plain;h=90fe22e94db467b2c54ade474212eeb2aeea292c;p=haproxy.git BUG/MEDIUM: compression: finish the stream on a NOOP block with EOM Since commit 221c40bbf ("MINOR: htx: Add a noop block to carry the EOM flag on an empty message"), the end of a message may come alone on a NOOP block when it is received after the last data. comp_http_payload() only finished the compression on a DATA block carrying the EOM or on a TLR or EOT block, so in this case the compressed stream was never finished while the response was sent as complete. This happens with an H2 server sending END_STREAM in a separate empty DATA frame, or with a FastCGI application ending its response after its last output. Some clients accept such a stream, others report an unexpected end of file. Let's handle a NOOP block carrying the EOM like the TLR and EOT blocks. This was brought in 3.5-dev14, so no backport is needed. --- diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c index f8076ceee..310a8655d 100644 --- a/src/flt_http_comp.c +++ b/src/flt_http_comp.c @@ -388,6 +388,10 @@ comp_http_payload(struct stream *s, struct filter *filter, struct http_msg *msg, } break; + case HTX_BLK_NOOP: + if (!(blk->flags & HTX_BLK_FL_EOM)) + goto consume; + __fallthrough; case HTX_BLK_TLR: case HTX_BLK_EOT: if (htx_compression_buffer_end(st, out, 1, dir) < 0)