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>
(cherry picked from commit 9ded6fab3298e5974a1fd7c0eb4491ff3fef3987)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1e6896eb4c0a4d39a3ae6d746d6d1f671696041c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 9f590f3741db56cb76205ed97a869804688de082)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/proto_htx.c b/src/proto_htx.c
index ea1e20f..fcb2441 100644
--- a/src/proto_htx.c
+++ b/src/proto_htx.c
@@ -1053,6 +1053,10 @@
 	if (htx->flags & HTX_FL_PARSING_ERROR)
 		goto return_bad_req;
 
+	/* CONNECT requests have no body */
+	if (txn->meth == HTTP_METH_CONNECT)
+		goto http_end;
+
 	if (msg->msg_state < HTTP_MSG_BODY)
 		goto missing_data;