From: Christopher Faulet Date: Fri, 29 Nov 2019 10:18:45 +0000 (+0100) Subject: BUG/MINOR: http-htx: Don't make http_find_header() fail if the value is empty X-Git-Tag: v2.2-dev1~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3ad62996fa3bab907429ce25a2ada10186b4242;p=thirdparty%2Fhaproxy.git BUG/MINOR: http-htx: Don't make http_find_header() fail if the value is empty 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. --- diff --git a/src/http_htx.c b/src/http_htx.c index 7489f62884..71a952d136 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -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;