MINOR: h1: Reject requests if the authority does not match the header host
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 11 Oct 2019 11:34:22 +0000 (13:34 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Oct 2019 20:28:50 +0000 (22:28 +0200)
commit531b83e039bbe369e4fe6e775e9bfa310d780da1
tree275e8d1e986786473a02c26d160ff1e66342c09e
parent497ab4f519f429b87cc47c7df7ea8a5ce369d567
MINOR: h1: Reject requests if the authority does not match the header host

As stated in the RCF7230#5.4, a client must send a field-value for the header
host that is identical to the authority if the target URI includes one. So, now,
by default, if the authority, when provided, does not match the value of the
header host, an error is triggered. To mitigate this behavior, it is possible to
set the option "accept-invalid-http-request". In that case, an http error is
captured without interrupting the request parsing.
src/h1.c