CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2016/07/27 00:55:44
Modified files:
usr.sbin/relayd: relay_http.c relayd.c relayd.h
Added files:
regress/usr.sbin/relayd: args-http-host.pl args-http-host2.pl
args-http-host3.pl args-http-host4.pl
Log message:
Improve parsing of the Host by following RFC 7230 Section 5.4 more strictly:
- Respond with a 400 (Bad Request) if there is more than one Host:
header to prevent ambiguities.
- Make sure that the host in the optional absolute form of
request-target (eg. GET http://www.target.com/ HTTP/1.1) matches the
Host: value. Proxies are supposed to ignore the Host: value if the
request-target exists, but relayd used to ignore the absolute
request-target form instead. In HTTP terminology, relayd is a gateway
and not a proxy, but it has to make sure that the host is validated
consistently.
OK benno@ bluhm@