BUG/MINOR: h1-htx: Don't flag response as bodyless when a tunnel is established
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 9 Sep 2024 16:16:49 +0000 (18:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Sep 2024 17:44:33 +0000 (19:44 +0200)
commit550ea03db26249974f7049f6170935b52c1eb620
tree84033b897a8cf18b747119df3e17bf53932eb2e8
parent0be5e36d8c823164baf0b0ae98cc66936a2034b8
BUG/MINOR: h1-htx: Don't flag response as bodyless when a tunnel is established

This reverts commit 225a4d02e1f6a12c0b4f3584949fad3339d71708.

When a 200-OK response is replied to a CONNECT request or a
101-Switching-protocol, a tunnel is considered as established between the
client and the server. However, we must not declare the reponse as
bodyless. Of course, there is no payload, but tunneled data are expected.

Because of this bug, the zero-copy forwarding is disabled on the server
side.

This patch must be backported as far as 2.9.

(cherry picked from commit a99d58819f8184fb6f500807ddaf2371c5f1c110)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/h1_htx.c