-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 sets multiple Host
header on wasi-http
when guest specifies it.
#8747
Comments
One additional piece of context is that it seems that StarlingMonkey is setting the |
Wasmtime in theory should be stripping the host header via functionality like this. The issue of setting the host and port should be fixed through #8563 (which required a follow-up fix at #8671, but both should be in the 21.0.0 release). Auditing a bit it looks like any guest-specified header goes through filtering before being inserted into Do you have an example guest which runs afoul of the double-host header? |
(and/or were y'all testing with 21.0.0? or an older version?) |
We were testing with version |
Aha ok makes sense! The |
I can confirm that this issue has been fixed by upgrading to wasmtime 21. |
It appears that wasmtime's implementation of outbound calls using
wasi-http
unconditionally set theHost
header here. It then appears to iterate over the headers provided by the guest here leading to there being multiple host headers when the guest automatically sets a host header which is the case for apps built using StarlingMonkey.This leads to certain servers rejecting the request because of duplicate headers. Should the guest not be setting a header or should wasmtime only set it conditionally?
The text was updated successfully, but these errors were encountered: