]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: h2/h3: Only test number of trailers inserted in HTX message
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 12 Mar 2026 10:21:34 +0000 (11:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Mar 2026 06:48:02 +0000 (07:48 +0100)
commit3250ec6e9c0ab0e20913f9c9b43d13afe38ad6cb
tree7b2cebc7ec2fa5b7968179af5ce075b9bce9731c
parent9c0aeb3af489cf9c058df88367ad0cf676d3aa7e
BUG/MINOR: h2/h3: Only test number of trailers inserted in HTX message

When H2 or H3 trailers are inserted in an HTX message, we must take care to
not exceed the maximum number of trailers allowed in a message (same than
the maximum number of headers, i.e tune.http.maxhdr). However, all HTX
blocks in the HTX message were considered. Only TRAILERS HTX blocks must be
considered.

To fix the issue, in h2_make_htx_trailers(), we rely on the "idx" variable
at the end of the for loop. In h3_trailers_to_htx(), we rely on the
"hdr_idx" variable.

This patch must be backported to all stables versions for the H2 part and as
far as 2.8 for the H3 one.

pouet
src/h2.c
src/h3.c