]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: h3: do not block FIN on empty DATA frame
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 3 Sep 2026 15:20:15 +0000 (17:20 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 8 Sep 2026 12:59:27 +0000 (14:59 +0200)
commit6c706c1a758b1e8bcdfe0816535edbd5c624db80
treeea8e2c4f83db90b7c859a6dd78d00b6e0915a185
parent83250420b1806a469949a11b7307d8e9904559a8
BUG/MEDIUM: h3: do not block FIN on empty DATA frame

A HTTP/3 DATA frame may be empty as its payload is entirely optional.
However, prior to this patch, H3 stream parsing was interrupted in this
case, unless other frames follow. The main problem is that it would lead
to a missing EOM if QUIC FIN is reported with an empty DATA frame,
causing the stream to freeze until timeout.

The first step of this patch is to first remove the early return for
empty HTTP/3 frame payload. This has the effect to allow calling the
different frame handlers with an empty payload. The current patch is
dedicated to HTTP/3 DATA support; other patches will follow to ensure
the safety of the other frame types handlers.

The second part of this patch is to adjust h3_data_to_htx() which is the
HTTP/3 data frame handler. It is now safe to call it with an empty
frame, with or without FIN. It will default to a noop operation, unless
FIN is set, in which case htx_set_eom() is used to report the closure of
the stream read channel.

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