`wasmtime-wasi-http` shouldn't add the default port to outbound `host` header
lann opened this issue · comments
Lann commented
The outbound HTTP implementation will add a default port to the URI authority if not present:
wasmtime/crates/wasi-http/src/http_impl.rs
Lines 68 to 69 in 1fa8de1
As reported on Zulip and as a Spin issue, this causes breakage with AWS signed requests, which include the exact host header value in the signature payload.
I believe the current behavior is incorrect. Per the HTTP/1.1 spec:
If the target URI includes an authority component, then a client MUST send a field value for Host that is identical to that authority component
Alex Crichton commented
cc @elliottt