]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Adjust header case when the server name is add to a request
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Oct 2019 09:06:13 +0000 (11:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Oct 2019 14:12:02 +0000 (16:12 +0200)
As all other h1 headers, if configured so, the case of this header must be adjusted.

No backport needed.

src/mux_h1.c

index d928c57f64ba36ea01797b40f9fb159ccdbd9759..230903b6b0c74af5af1e3fc95e4387afa767a743 100644 (file)
@@ -1699,6 +1699,10 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
                                        if (srv) {
                                                n = ist2(h1c->px->server_id_hdr_name, h1c->px->server_id_hdr_len);
                                                v = ist(srv->id);
+
+                                               /* Try to adjust the case of the header name */
+                                               if (h1c->px->options2 & (PR_O2_H1_ADJ_BUGCLI|PR_O2_H1_ADJ_BUGSRV))
+                                                       h1_adjust_case_outgoing_hdr(h1s, h1m, &n);
                                                if (!htx_hdr_to_h1(n, v, &tmp))
                                                        goto copy;
                                        }