]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h1: Don't add Connection close/keep-alive header for 1xx messages
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Dec 2020 15:46:33 +0000 (16:46 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Jan 2021 15:37:14 +0000 (16:37 +0100)
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.

src/mux_h1.c

index 266a2e70d75085f8b2eb7a62f3ff291b34016c0c..a49531f55d53cfa75483770f4bea1f5f4dd71cd3 100644 (file)
@@ -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;