]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: h3: do not retry on trailers too large
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 23 Oct 2026 08:44:41 +0000 (10:44 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 23 Oct 2026 09:36:55 +0000 (11:36 +0200)
commit6e4154d1fa45043ef4b6c4a2c7fbcc1f1a0bdd3b
tree300a95616c4ca17384cbeff3ecd0f70b1b77d97c
parent8020cefc30ceadf61b45130609b90fdbb0741840
BUG/MINOR: h3: do not retry on trailers too large

The following patch adds the ability for the QUIC transcoder to release
a buffer if there is not enough space in it and allocate a new one
instead. This is mostly used during DATA and trailers encoding.

  cd22200d239773a851c6b78e722864fa5103af6a
  MEDIUM: mux-quic: release Tx buf on too small room

For trailers encoding it may cause an infinite loop if the content is
larger than a whole buffer. In this case, transcoder will release and
allocate a new buffer without interruption before the watchdog is
triggered.

Fix this by extending h3_resp_trailers_send(). The buffer is now
released only when it contains residual not yet sent or acknowledged
data. If the buffer is empty, trailers are too large and an error is
returned, which will close the connection with INTERNAL_ERROR code. This
method was in fact already implemented in h3_resp_headers_send().

This must be backported up to 3.0.
src/h3.c