]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxy: Store http-send-name-header in lower case
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Oct 2019 08:45:55 +0000 (10:45 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Oct 2019 14:12:02 +0000 (16:12 +0200)
All HTTP header names are now handled in lower case. So this one is now stored
in lower case. It will simplify some processing in HTTP muxes.

src/cfgparse-listen.c

index 656031b0a45ee8e25c6888c5dc4abe9cbe50a086..a5d46f593c8ca1fdfb62e446203bfeac7754cbc5 100644 (file)
@@ -1396,10 +1396,11 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                        goto out;
                }
 
-               /* set the desired header name */
+               /* set the desired header name, in lower case */
                free(curproxy->server_id_hdr_name);
                curproxy->server_id_hdr_name = strdup(args[1]);
                curproxy->server_id_hdr_len  = strlen(curproxy->server_id_hdr_name);
+               ist2bin_lc(curproxy->server_id_hdr_name, ist2(curproxy->server_id_hdr_name, curproxy->server_id_hdr_len));
        }
        else if (!strcmp(args[0], "block")) {
                ha_alert("parsing [%s:%d] : The '%s' directive is not supported anymore since HAProxy 2.1. Use 'http-request deny' which uses the exact same syntax.\n", file, linenum, args[0]);