From: Christopher Faulet Date: Mon, 2 Oct 2023 08:42:32 +0000 (+0200) Subject: MINOR: h1-htx: Declare successful tunnel establishment as bodyless X-Git-Tag: v2.9-dev7~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=225a4d02e1f6a12c0b4f3584949fad3339d71708;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/h1_htx.c b/src/h1_htx.c index f0c525e677..f3b61b70ed 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)) {