From: Christopher Faulet Date: Thu, 3 Dec 2026 16:23:51 +0000 (+0100) Subject: BUG/MINOR: htx: remove the EOM flag from a DATA block truncated by htx_truncate() X-Git-Url: https://git.kaiwu.me/web/ngx_http_fastcgi_module.html?a=commitdiff_plain;h=4c8c97e68823739443241974fbb5da402937523a;p=haproxy.git BUG/MINOR: htx: remove the EOM flag from a DATA block truncated by htx_truncate() htx_truncate() removes all blocks after the one containing the given offset, and truncates this last one if it is a DATA block. But the truncated block kept its flags, including HTX_BLK_FL_EOM. So a message truncated in the middle of its last DATA block was still considered as complete. Now, the EOM flag is removed from the truncated block. This patch must be backported to 3.5. --- diff --git a/src/htx.c b/src/htx.c index 29e419d40..bda321397 100644 --- a/src/htx.c +++ b/src/htx.c @@ -530,7 +530,11 @@ void htx_truncate(struct htx *htx, uint32_t offset) blk = htxret.blk; if (blk && htxret.ret && htx_is_data_type(htx_get_blk_type(blk))) { + /* The block is truncated, so it cannot carry the EOM flag + * anymore: the message is not complete. + */ htx_change_blk_value_len(htx, blk, htxret.ret); + blk->flags &= ~HTX_BLK_FL_EOM; blk = htx_get_next_blk(htx, blk); } while (blk)