-
-
Notifications
You must be signed in to change notification settings - Fork 614
Open
Labels
BugBug report in proxy serverBug report in proxy server
Description
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
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.
abhinavsingh
Metadata
Metadata
Assignees
Labels
BugBug report in proxy serverBug report in proxy server