XMLHttpRequest: improve Content-Type manipulation coverage#59769
Merged
Conversation
Member
Author
|
cc @Gae24 |
Member
Author
|
I think I see, per #13273 the issue is that XMLHttpRequest says this only applies to USVString or Document arguments, but here browsers apply it to URLSearchParams. We should probably test the other types of arguments and see which ones browsers overwrite with UTF-8 as well and then update the XMLHttpRequest specification. |
webkit-commit-queue
pushed a commit
to annevk/WebKit
that referenced
this pull request
May 9, 2026
https://bugs.webkit.org/show_bug.cgi?id=314468 Reviewed by Brandon Stewart. Also mark imported/w3c/web-platform-tests/xhr/send-redirect-post-upload.htm as passing as the remaining issues had been tackled seven years ago. We also account for web-platform-tests/wpt#59769 and for now do not import the sync-xhr permission policy tests as that is non-standard. Upstream commit: web-platform-tests/wpt@d6f9273 Canonical link: https://commits.webkit.org/312947@main
Contributor
|
Honestly, I can't recall exactly why I dropped the test case, but it was most likely due to the same findings mentioned in #13273. |
This reverts commit 733cc58.
a58696b to
4104271
Compare
5 tasks
annevk
added a commit
to whatwg/xhr
that referenced
this pull request
May 14, 2026
This is what implementations appear to do. Tests: web-platform-tests/wpt#59769.
XMLHttpRequest Send: fix Content-Type failures"
Member
Author
|
I created a patch to update the specification here whatwg/xhr#406 and repurposed this revert PR to improve coverage. |
foolip
approved these changes
May 14, 2026
annevk
added a commit
to whatwg/xhr
that referenced
this pull request
May 14, 2026
Align with implementations. Tests: web-platform-tests/wpt#59769. Fixes web-platform-tests/wpt#13273.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#54561 removed a test case citing whatwg/xhr#205 as reason, but I cannot find in there the reason for why this test was removed and if anything is to be changed it is the expectations. We should only remove test coverage when the exact scenario is already covered elsewhere. It does not seem like this was such a case as I presume Servo fails this test, while WebKit for instance is passing it.