]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h1: Remove useless case-insensitive comparisons
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 28 Feb 2020 09:42:20 +0000 (10:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 28 Feb 2020 09:49:09 +0000 (10:49 +0100)
Header names from an HTX message are always in lower-case, so the comparison may
be case-sensitive.

src/mux_h1.c

index d135b9b8d7f8ec64b159a65f752a8944d217b16e..b10e80c047b53fa1669a5a07193c0c9ff05d57d9 100644 (file)
@@ -1669,14 +1669,14 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
                                if (*(n.ptr) == ':')
                                        goto skip_hdr;
 
-                               if (isteqi(n, ist("transfer-encoding")))
+                               if (isteq(n, ist("transfer-encoding")))
                                        h1_parse_xfer_enc_header(h1m, v);
-                               else if (isteqi(n, ist("content-length"))) {
+                               else if (isteq(n, ist("content-length"))) {
                                        /* Only skip C-L header with invalid value. */
                                        if (h1_parse_cont_len_header(h1m, &v) < 0)
                                                goto skip_hdr;
                                }
-                               else if (isteqi(n, ist("connection"))) {
+                               else if (isteq(n, ist("connection"))) {
                                        h1_parse_connection_header(h1m, &v);
                                        if (!v.len)
                                                goto skip_hdr;