From: Christopher Faulet Date: Wed, 2 Dec 2020 15:46:33 +0000 (+0100) Subject: MINOR: mux-h1: Don't add Connection close/keep-alive header for 1xx messages X-Git-Tag: v2.4-dev7~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3e7619041dee3d61db7a6756e220ca15895c0da;p=thirdparty%2Fhaproxy.git MINOR: mux-h1: Don't add Connection close/keep-alive header for 1xx messages No connection header must be added by the H1 mux in 1xx messages, including 101. Existing connection headers remains untouched, especially the "Connection: upgrade" of 101 responses. This patch only avoids to add "Connection: close" or "Connection: keep-alive" to 1xx responses. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 266a2e70d7..a49531f55d 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1805,7 +1805,7 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun goto full; if (sl->flags & HTX_SL_F_XFER_LEN) h1m->flags |= H1_MF_XFER_LEN; - if (h1s->status < 200 && (h1s->status == 100 || h1s->status >= 102)) + if (h1s->status < 200) h1s->flags |= H1S_F_HAVE_O_CONN; else if (h1s->status == 204 || h1s->status == 304) h1s->flags |= H1S_F_BODYLESS_RESP;