]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream: Properly handle TCP>H1>H2 upgrades in http_wait_for_request
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Mar 2021 16:10:12 +0000 (17:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 1 Apr 2021 09:06:47 +0000 (11:06 +0200)
commit97b3a614495b5c9a6139bbbcb6266d51606fa2c5
tree8cca8d3111d1b5e91b1d376fab1cb3a1696225fd
parent57e4a1bf44598bc0f62e10da8778d762c976d9dc
BUG/MINOR: stream: Properly handle TCP>H1>H2 upgrades in http_wait_for_request

When a TCP stream is first upgraded to H1 and then to H2, we must be sure to
inhibit any connect and to properly handle the TCP stream destruction.

When the TCP stream is upgraded to H1, the HTTP analysers are set. Thus
http_wait_for_request() is called. In this case, the server connection must
be blocked, waiting for the request analysis. Otherwise, a server may be
assigned to the stream too early. It is especially a problem if the stream
is finally destroyed because of an implicit upgrade to H2.

In this case, the stream processing must be properly aborted to not have a
stalled stream. Thus, if a shutdown is detected in http_wait_for_request()
when an HTTP upgrade is performed, the stream is aborted.

It is a 2.4-specific bug. No backport is needed.
src/http_ana.c