]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: hq-interop: prevent double EOM on request with standalone FIN
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Oct 2026 08:37:06 +0000 (10:37 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Oct 2026 08:57:53 +0000 (10:57 +0200)
commita8dc3ee68fe14dfb4b91d99ad92aceb3ae38a253
tree252abdbb031fb37514f389868503e86af58e21a9
parentbd884a20377963fda9031c878ec4020b84da1f77
BUG/MINOR: hq-interop: prevent double EOM on request with standalone FIN

Previously, HTX EOM was unconditionnaly set during HTTP/0.9 to HTX
request conversion. This was valid as content was only parsed when all
STREAM were received.

However, this has changed in 3.2 with support for incomplete request and
standalone FIN in HTTP/0.9 parser. The objective is to better test a
mechanism close to HTTP/3 parser. But unconditionnal EOM was not
adjusted. Thus, EOM would be set two times per message if FIN is
transmitted via a dedicated empty STREAM frame.

Previously, this was silently ignored by stream layer. However, this is
not case anymore since conversion of HTX EOM from a message level to a
block level flag. A new BUG_ON() added in htx_add_blk() would report
incorrect blocks found after EOM : this may be triggered in case the
second EOM is reported through an EOT block.

Fix this only setting EOM if fin is set during HTTP/0.9 request parsing.
Handling of standalone FIN is already supported here so there is no need
for more changes. Now, HTTP/0.9 parser can now considered even more
closer to HTTP/3.

This should be backported up to 3.2.
src/hq_interop.c