Content-Type and related headers not stripped for certain redirects when using XMLHttpRequest
Categories
(Core :: DOM: Networking, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: annevk, Assigned: CuveeHsu)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Bug 1530230 apparently only addressed this for the fetch API, rather than fetch in general.
https://github.com/web-platform-tests/wpt/pull/23164 has a couple very basic tests. It might be worth it to write more.
This might also be a problem for sendBeacon()
, I haven't looked into it deeply.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
We failed in:
XMLHttpRequest: send() - Redirect to CORS-enabled resource (303 FOO with string and explicit Content-Type safelisted)
assert_equals: expected "NO" but got "application/x-pony"
XMLHttpRequest: send() - Redirect to CORS-enabled resource (301 POST with string and explicit Content-Type safelisted)
assert_equals: expected "NO" but got "application/x-pony"
Assignee | ||
Comment 2•5 years ago
|
||
XHR copies header in mAuthorRequestHeaders.ApplyToChannel in XMLHttpRequestMainThread::OnRedirectVerifyCallback
Reporter | ||
Comment 3•5 years ago
|
||
Note that I ended up creating a follow-up PR at https://github.com/web-platform-tests/wpt/pull/23176 which still has some outstanding feedback. There might be a couple more issues here.
Ideally XHR would reuse the fetch() infrastructure and not duplicate it.
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
https://github.com/web-platform-tests/wpt/pull/23176 fails on a different reason, I'd like to file another follow-up bug after this is landed.
As for dup, In the patch I still dup some of the code, we might end up using https://searchfox.org/mozilla-central/source/netwerk/protocol/http/HttpBaseChannel.cpp#3077 but we need to do additional parse.
Not sure how bug 1449613 goes, I rather not to think too much for small piece dup.
Comment 7•4 years ago
|
||
bugherder |
Description
•