bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly

Home Page:https://wasmtime.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`wasmtime-wasi-http` shouldn't add the default port to outbound `host` header

lann opened this issue · comments

commented

The outbound HTTP implementation will add a default port to the URI authority if not present:

} else {
format!("{}:{port}", authority)

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