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.
This commit is contained in:
Christopher Faulet 2026-04-22 17:24:56 +02:00
parent 392abee6d4
commit 7798c38fd3

View File

@ -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);