BUG/MINOR: http-ana: Don't wait for the body of CONNECT requests
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 16 Nov 2020 15:03:35 +0000 (16:03 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Nov 2020 09:43:07 +0000 (10:43 +0100)
commit9ded6fab3298e5974a1fd7c0eb4491ff3fef3987
tree79095461b88e5fd38f107715d288f5966d8ac525
parent44ba5dbe6ee29b7c37630bca57a2f2c1fd1daa35
BUG/MINOR: http-ana: Don't wait for the body of CONNECT requests

CONNECT requests are bodyless messages but with no EOM blocks. Thus, conditions
to stop waiting for the message payload are not suited to this kind of
messages. Indeed, the message finishes on an EOH block. But the tunnel mode at
the stream level is only set in HTTP_XFER_BODY analyser. So, the stream is
blocked, waiting for a body that does not exist till a timeout expires.

To fix this bug, we just stop waiting for a body for CONNECT requests. Another
solution is to rely on HTX_SL_F_BODYLESS/HTTP_MSGF_BODYLESS flags. But this one
is less intrusive.

This message must be backported as far as 2.0. For the 2.0, only the HTX part
must be fixed.

(cherry picked from commit 63c69a9b4ef1136c66967463b9e4b3538e35c016)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_ana.c