]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: h3: prevent missing request FIN on empty trailers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 13 Nov 2026 15:27:57 +0000 (16:27 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 13 Nov 2026 15:48:10 +0000 (16:48 +0100)
commit42daaf9575dc193872e54e9303b40d6e0735b555
treef1dd3c5d14f52b1f33a9c82311ef3662494e6122
parent1078013590e26ca1c3e0ca265a38b018638de05d
BUG/MINOR: h3: prevent missing request FIN on empty trailers

Since the following patch, HTTP/3 trailers are only decoded when the
stream HTX buffer is empty, with previous data already consumed by the
upper layer. This is the simplest reason to ensure there is always
enough space for trailers decoding.

  8020cefc30ceadf61b45130609b90fdbb0741840
  BUG/MEDIUM: h3: prevent conn failure on trailers decoding without space

However, this check is also performed for an empty trailers frame, which
is unnecessary and thus suboptimal. Worse, QCS demux is blocked but when
it is woken up there is nothing left to decode as the empty trailers
frame header was already consumed and the demuxer starts on a new frame.
The trailer frame and its FIN signal are thus dropped.

To fix this, simply bypass the check on HTX buffer if the trailers frame
is empty. EOM is then reported and the rest of the frame parsing is
skipped.

Note that h3_resp_headers_to_htx() has a similar check. However, an
HTTP/3 headers frame cannot be empty as it must contain mandatory
pseudo-headers, thus an empty headers frame is rejected earlier.

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