From: Christopher Faulet Date: Wed, 22 Apr 2026 15:24:56 +0000 (+0200) Subject: BUG/MINOR: mux-h1: Fix test to skip trailers from chunked messages X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7798c38fd3259da27dd458c0eba597066bb882a1;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Fix test to skip trailers from chunked messages The test to remove trailers from chunked messages was inverted and is thus ineffective. The flag for the requests was tested on client side and the flag for the response was tested on server side. It should be the opposite. This patch must be backported as far as 3.2. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index b05ddcc9a..527d3495f 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -3471,8 +3471,8 @@ static size_t h1_make_trailers(struct h1s *h1s, struct h1m *h1m, struct htx *htx goto nextblk; /* Skip the trailers because the corresponding conf option was set */ - if ((!(h1m->flags & H1_MF_RESP) && (h1c->px->options & PR_O_HTTP_DROP_RES_TRLS)) || - ((h1m->flags & H1_MF_RESP) && (h1c->px->options & PR_O_HTTP_DROP_REQ_TRLS))) + if ((!(h1m->flags & H1_MF_RESP) && (h1c->px->options & PR_O_HTTP_DROP_REQ_TRLS)) || + ((h1m->flags & H1_MF_RESP) && (h1c->px->options & PR_O_HTTP_DROP_RES_TRLS))) goto nextblk; n = htx_get_blk_name(htx, blk);