-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fetch fails when guest content set Host
header.
#145
Comments
This may well have regressed in the recent headers work, but this should be a simple fix, I believe what is needed is to add a forbidden headers filter after obtaining the headers list here - https://github.com/bytecodealliance/StarlingMonkey/blob/main/builtins/web/fetch/headers.cpp#L451. And it would also be good to add a test to avoid future regressions as well. |
I am not entirely sure how the tests work in this repo but I think this is a test that already tracks it(?) StarlingMonkey/tests/wpt-harness/expectations/fetch/api/basic/request-forbidden-headers.any.js.json Lines 35 to 36 in 523d78d
|
It may well do, although this has never passed for StarlingMonnkey so that doesn't line up the comment that this was a regression, but however we get coverage is of course fine. |
When the guest content sets the
Host
header, it fails with the following errorThis is because' Host' is a forbidden header in the
wasi-http
spec. I believe that this was fixed a while back where the engine would remove the host header but it seems to have regressed now.The text was updated successfully, but these errors were encountered: