]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-htx: Don't make http_find_header() fail if the value is empty
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Nov 2019 10:18:45 +0000 (11:18 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Nov 2019 10:48:15 +0000 (11:48 +0100)
http_find_header() is used to find the next occurrence of a header matching on
its name. When found, the matching header is returned with the corresponding
value. This value may be empty. Unfortunatly, because of a bug, an empty value
make the function fail.

This patch must be backported to 2.1, 2.0 and 1.9.

src/http_htx.c

index 7489f628847aa845ae1034ec51d3650d84ff0f8b..71a952d13672efa27bf3a7a262fc777eb573dac7 100644 (file)
@@ -112,8 +112,6 @@ int http_find_header(const struct htx *htx, const struct ist name,
                        v.len--;
                        ctx->lws_after++;
                }
-               if (!v.len)
-                       continue;
                ctx->blk   = blk;
                ctx->value = v;
                return 1;