diff --git a/src/h1_htx.c b/src/h1_htx.c index a2ee5108d..734f9cbce 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -146,6 +146,8 @@ static unsigned int h1m_htx_sl_flags(struct h1m *h1m) else flags |= HTX_SL_F_BODYLESS; } + if (h1m->state == H1_MSG_TUNNEL) + flags |= HTX_SL_F_BODYLESS; return flags; } diff --git a/src/http_ana.c b/src/http_ana.c index 741ec56b1..5dfd41bde 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -875,8 +875,8 @@ int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit if (htx->flags & HTX_FL_PROCESSING_ERROR) goto return_int_err; - /* CONNECT requests have no body */ - if (txn->meth == HTTP_METH_CONNECT) + /* Do nothing for bodyless and CONNECT requests */ + if (txn->meth == HTTP_METH_CONNECT || (msg->flags & HTTP_MSGF_BODYLESS)) goto http_end; /* We have to parse the HTTP request body to find any required data.