You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
incorrect host field is not replaced but passed through to upstream server
To Reproduce
start proxy.py and then on bash type printf "GET http://httpbin.org/headers HTTP/1.1\r\nHost: foobar\r\nConnection: close\r\n\r\n" | nc -w 3 localhost 8899
outcome has foobar as host:
Expected behavior
according to https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
When a proxy receives a request with an absolute-form of
request-target, the proxy MUST ignore the received Host header field
(if any) and instead replace it with the host information of the
request-target. A proxy that forwards such a request MUST generate a
new Host field-value based on the received request-target rather than
forward the received Host field-value.
The text was updated successfully, but these errors were encountered:
Describe the bug
incorrect host field is not replaced but passed through to upstream server
To Reproduce
start proxy.py and then on bash type
printf "GET http://httpbin.org/headers HTTP/1.1\r\nHost: foobar\r\nConnection: close\r\n\r\n" | nc -w 3 localhost 8899
outcome has foobar as host:
Expected behavior
according to https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
When a proxy receives a request with an absolute-form of
request-target, the proxy MUST ignore the received Host header field
(if any) and instead replace it with the host information of the
request-target. A proxy that forwards such a request MUST generate a
new Host field-value based on the received request-target rather than
forward the received Host field-value.
The text was updated successfully, but these errors were encountered: