-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Fix GodotFetch glue code for null response bodies #98431
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes (more nitpicks than real changes), but very good overall. Thanks!
a7f2dc8
to
a36871f
Compare
You can remove me from the commit! Keep ownership of it, really. |
The spec says that Response.body can be null (in the event of requests that should have no body, like HEAD requests) and Firefox adheres to it which results in request failure for HEAD requests on Firefox for web exports. This commit addresses that by treating a null body as an "empty" body (without using a polyfill) and avoids changing the request lifecycle as much as possible. PR review changes: - Use == instead of strict === - Do not use ?? null - Comment formatting
a36871f
to
c7f421e
Compare
I updated the commit and also fixed the eslint error, and rebuilt the export locally and re-verified it on both my project as well as the MRP I provided. Thanks for the review! |
Thanks, and congratulations on your first contribution! 🎉 |
Fixes #76825
The spec says that
body
can benull
for fetch responses (in the event of requests that should have no body, like HEAD requests) and Firefox adheres to it which results in request failure for HEAD requests on Firefox for web exports.This fix addresses that by treating a
null
body as an "empty" body (without using a polyfill) and avoids changing the request lifecycle as much as possible.Minimal reproduction project: mrp-gh76825.zip