I bumped into this issue when using pyreqwest (a Python binding for reqwest) where I hit an API (I believe it's envoy edge-proxy) which proxies the url path to the host defined in the Host header. For example GET https://proxy-host.net/hello -H 'Host: actual-host.net', the proxy server "proxies" the /hello request to actual-host.net.
When using pyreqwest with HTTP/2 enabled, the request fails (503 from the server) because the Host header is stripped out of the request (since it's not allowed in HTTP/2).
However, when using curl, the request succeeds as curl maps the Host header to :authority pseudo-header when using HTTP/2 and this seems to be the behavior of other HTTP clients (such as Python's httpx).
Is this something that can be somehow supported by reqwest?
Referencing the original issue in pyreqwest: MarkusSintonen/pyreqwest#3
I bumped into this issue when using pyreqwest (a Python binding for reqwest) where I hit an API (I believe it's envoy edge-proxy) which proxies the url path to the host defined in the
Hostheader. For exampleGET https://proxy-host.net/hello -H 'Host: actual-host.net', the proxy server "proxies" the/hellorequest toactual-host.net.When using pyreqwest with HTTP/2 enabled, the request fails (503 from the server) because the
Hostheader is stripped out of the request (since it's not allowed in HTTP/2).However, when using curl, the request succeeds as curl maps the
Hostheader to:authoritypseudo-header when using HTTP/2 and this seems to be the behavior of other HTTP clients (such as Python's httpx).Is this something that can be somehow supported by reqwest?
Referencing the original issue in pyreqwest: MarkusSintonen/pyreqwest#3