From: Christopher Faulet Date: Wed, 22 Jul 2026 08:59:57 +0000 (+0200) Subject: BUG/MEDIUM: htx: Don't reset flags when source must be preserved during transfer X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=04a39f5518e256d20e44e5abe0f8e8d3a7e573bf;p=haproxy.git BUG/MEDIUM: htx: Don't reset flags when source must be preserved during transfer When htx_xfer() is called with HTX_XFER_KEEP_SRC_BLKS flag, to preserve blocks from the source HTX message, the source flags must not be reset at the end of the transfer. This bug can be triggered with L7-retries are configured with small buffers. In that case, the HTX_FL_EOM flag is removed from the request fowarded to the backend multiplexer. This patch must be backported to 3.4. --- diff --git a/src/htx.c b/src/htx.c index 7143e3961..2a369f30f 100644 --- a/src/htx.c +++ b/src/htx.c @@ -893,7 +893,8 @@ size_t htx_xfer(struct htx *dst, struct htx *src, size_t count, unsigned int fla /* Everything was copied, transfer terminal HTX flags too */ if (!blk) { dst->flags |= (src->flags & (HTX_FL_EOM|HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR)); - src->flags = 0; + if (!(flags & HTX_XFER_KEEP_SRC_BLKS)) + src->flags = 0; } return ret;