BUG/MEDIUM: h1: Don't compare host and authority if only h1 headers are parsed
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 4 May 2020 07:01:45 +0000 (09:01 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 May 2020 16:43:45 +0000 (18:43 +0200)
commit226ca1a0ca39efff8277e015f7d2fd12278d8dc5
tree2c9a51e50d7db9b6955e2b4aaf08d6e7ebed722a
parent3ad3306ec0bcb0cd4ca2b9ba134ed67663473ee8
BUG/MEDIUM: h1: Don't compare host and authority if only h1 headers are parsed

When only request headers are parsed, the host header should not be compared to
the request authority because no start-line was parsed. Thus there is no
authority.

Till now this bug was hidden because this parsing mode was only used for the
response in the FCGI multiplexer. Since the HTTP checks refactoring, the request
headers may now also be parsed without the start-line.

This patch fixes the issue #610. It must be backported to 2.1.

(cherry picked from commit 7032a3fd0a71426d338190ec0eeb86f5c547c3dd)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/h1.c