]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hq-interop: prevent reset if missing content-length master
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 19 Jun 2026 08:09:17 +0000 (10:09 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 19 Jun 2026 08:30:18 +0000 (10:30 +0200)
commit9854b6f98304f06a0fe4a421868f650d3291a1cb
treec1ef394b96e3bae704d3ee59153fcbb07cb78149
parentc2638c826c969a8ec346d03b9e1ccd1ba6d7b1a2
BUG/MINOR: hq-interop: prevent reset if missing content-length

HTTP/0.9 transcoder is minimal. In particular, it did not checked if the
HTX payload length was unknown. In this case, the stream shutdown is the
normal termination signal. As this condition was not reported to the
MUX, the stream would be closed via a RESET_STREAM during the stream
shut callback invokation.

Fix this by properly inspecting HTX response line prior to generating
the HTTP/0.9 response. If flag HTX_SL_F_XFER_LEN is not set, correctly
convert it to QCS flag QC_SF_UNKNOWN_PL_LENGTH. This ensures that MUX
will use a FIN signal instead of a RESET_STREAM frame when shut is
called by the upper stream layer.

This procedure is already implemented by HTTP/3 transcoder.

This bug was detected with haterm, because contrary to httpterm the
latter does not honour Connection keep-alive header in case of HTTP/1.0.
Thus connection close mode is used and no content-length is added.

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