Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lann opened this issue Apr 22, 2024 · 1 comment · Fixed by #8563
Closed

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

lann opened this issue Apr 22, 2024 · 1 comment · Fixed by #8563

Comments

@lann
Copy link
Contributor

lann commented Apr 22, 2024

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

@alexcrichton
Copy link
Member

cc @elliottt

@lann lann changed the title wasmtime-wasi-http shouldn't add the default port to outbound `host header wasmtime-wasi-http shouldn't add the default port to outbound host header Apr 22, 2024
elliottt added a commit to elliottt/wasmtime that referenced this issue May 6, 2024
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this issue May 7, 2024
alexcrichton added a commit that referenced this issue May 7, 2024
Fixes #8430

Co-authored-by: Trevor Elliott <telliott@fastly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants