]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Fix processing of "Connection: " header on outgoing messages
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 27 Nov 2018 09:46:09 +0000 (10:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 16:20:36 +0000 (17:20 +0100)
in h1_process_output(), before formatting the headers, we need to find and check
the "Connection: " header to update the connection mode. But, the context used
to do so was not correctly initialized. We must explicitly set ctx.value to NULL
to be sure to rescan the current header.

src/mux_h1.c

index bade571a7d035e5bdbe4a88c07ad97df980dd738..1ceac128aabacbc199a237fad805d08109c959d9 100644 (file)
@@ -1219,6 +1219,7 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
                                         * right one.
                                         */
                                        ctx.blk = blk;
+                                       ctx.value = ist(NULL);
                                        if (http_find_header(chn_htx, n, &ctx, 1))
                                                goto process_hdr;
                                        h1_process_conn_mode(h1s, h1m, NULL, &v);