From 225a4d02e1f6a12c0b4f3584949fad3339d71708 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 2 Oct 2023 10:42:32 +0200 Subject: [PATCH] MINOR: h1-htx: Declare successful tunnel establishment as bodyless Successful responses to a CONNECT or to a upgrade request have no payload. Be explicit on this point by setting HTX_SL_F_BODYLESS_RESP flag on the HTX start-line. --- src/h1_htx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/h1_htx.c b/src/h1_htx.c index f0c525e67..f3b61b70e 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -288,6 +288,7 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx h1m->flags &= ~(H1_MF_CLEN|H1_MF_CHNK); h1m->flags |= H1_MF_XFER_LEN; h1m->curr_len = h1m->body_len = 0; + flags |= HTX_SL_F_BODYLESS_RESP; } else if ((h1m->flags & H1_MF_METH_HEAD) || (code >= 100 && code < 200) || (code == 204) || (code == 304)) {