From: Christopher Faulet Date: Wed, 27 Nov 2019 13:00:51 +0000 (+0100) Subject: BUG/MINOR: h1: Don't test the host header during response parsing X-Git-Tag: v2.2-dev1~236 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc7c03eba39ec9f0b94734399853bbece1e1a250;p=thirdparty%2Fhaproxy.git BUG/MINOR: h1: Don't test the host header during response parsing During the H1 message parsing, the host header is tested to be sure it matches the request's authority, if defined. When there are multiple host headers, we also take care they are all the same. Of course, these tests must only be performed on the requests. A host header in a response has no special meaning. This patch must be backported to 2.1. --- diff --git a/src/h1.c b/src/h1.c index 83afb14ebc..15827db564 100644 --- a/src/h1.c +++ b/src/h1.c @@ -833,7 +833,7 @@ int h1_headers_to_hdr_list(char *start, const char *stop, break; } } - else if (isteqi(n, ist("host"))) { + else if (!(h1m->flags & H1_MF_RESP) && isteqi(n, ist("host"))) { if (host_idx == -1) { struct ist authority;