]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux-h2: don't abort a tunnel attempt on interim responses
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 17 Nov 2026 15:37:38 +0000 (16:37 +0100)
committerOlivier Houchard <cognet@ci0.org>
Tue, 17 Nov 2026 15:29:59 +0000 (16:29 +0100)
commit65ebeb19c3e7f354cc3b14485997c28b64a5325e
treed0a28be79dc6ae126d5f4707c30b76a68212b927
parent68a8abcbe31887c8efb6fcd4c64b7b6feaff1b51
BUG/MEDIUM: mux-h2: don't abort a tunnel attempt on interim responses

On the backend side, when a CONNECT or an Extended CONNECT request was
sent, h2c_dec_hdrs() aborts the tunnel attempt as soon as a response
without H2_MSGF_BODY_TUNNEL is received. But h2_make_htx_response() clears
this flag for any status other than 2xx and 101, including interim
responses (1xx) such as 100 Continue or 103 Early Hints. H2_SF_BODY_TUNNEL
is then removed and H2_SF_TUNNEL_ABRT set, so that the final 200 response
is processed as a regular response with a body. The client receives the
interim and the final responses, but the connection is closed as soon as
data are exchanged. This breaks CONNECT and WebSocket (Extended CONNECT)
through H2 servers emitting interim responses.

Let's only abort the tunnel attempt on final responses.

This has been there since 2.4 with commit d0db42326 ("MINOR: mux-h2: Add 2
flags to help to properly handle tunnel mode") and must be backported to
all stable versions.
src/mux_h2.c