From: Amaury Denoyelle Date: Tue, 6 Oct 2026 08:37:06 +0000 (+0200) Subject: BUG/MINOR: hq-interop: prevent double EOM on request with standalone FIN X-Git-Tag: v3.5-dev9~201 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=a8dc3ee68fe14dfb4b91d99ad92aceb3ae38a253;p=haproxy.git 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. --- diff --git a/src/hq_interop.c b/src/hq_interop.c index 663e9fead..9ffe2cb00 100644 --- a/src/hq_interop.c +++ b/src/hq_interop.c @@ -109,7 +109,8 @@ static ssize_t hq_interop_rcv_buf_req(struct qcs *qcs, struct buffer *b, int fin sl->info.req.meth = find_http_meth(istptr(meth), 3); htx_add_endof(htx, HTX_BLK_EOH); - htx_set_eom(htx); + if (fin) + htx_set_eom(htx); htx_to_buf(htx, &htx_buf); hq_trace_req(meth, path, QMUX_EV_QCC_RECV, ist(TRC_LOC), __FUNCTION__, qcs, qcs->qcc);