Skip to content
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

Adjust XHR CORS test to allow custom Content-Type #4801

Closed

Conversation

sideshowbarker
Copy link
Contributor

No description provided.

@wpt-pr-bot
Copy link
Collaborator

@w3c-bots
Copy link

Chrome (unstable channel)

Testing web-platform-tests at revision b18cb2f
Using browser at version 58.0.3004.3 dev
Starting 10 test iterations
All results were stable

All results

/XMLHttpRequest/timeout-cors-async.htm
Subtest Results
OK
XMLHttpRequest: timeout event and cross-origin request PASS
/XMLHttpRequest/event-upload-progress-crossorigin.htm
Subtest Results
OK
XMLHttpRequest: upload progress event for cross-origin requests PASS
/XMLHttpRequest/send-redirect-to-cors.htm
Subtest Results
OK
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307 post with null) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (301) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (303) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (302) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307 post with string) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307 post with typed array) PASS

@w3c-bots
Copy link

Firefox (nightly channel)

Testing web-platform-tests at revision b18cb2f
Using browser at version BuildID 20170123125947; SourceStamp 36486fdc3813ef7943ae5b07b4128866d1938a6c
Starting 10 test iterations
All results were stable

All results

/XMLHttpRequest/timeout-cors-async.htm
Subtest Results
OK
XMLHttpRequest: timeout event and cross-origin request PASS
/XMLHttpRequest/event-upload-progress-crossorigin.htm
Subtest Results
OK
XMLHttpRequest: upload progress event for cross-origin requests PASS
/XMLHttpRequest/send-redirect-to-cors.htm
Subtest Results
OK
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307 post with null) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (301) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (303) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (302) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307 post with string) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307) PASS
XMLHttpRequest: send() - Redirect to CORS-enabled resource (307 post with typed array) PASS

@annevk
Copy link
Member

annevk commented Feb 20, 2017

Can you explain what you are making this change for? Hard to tell without corresponding test.

@sideshowbarker
Copy link
Contributor Author

See https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/send-redirect-to-cors.htm#L53

As far as I can see, those tests are failing in Blink and WebKit due to the Access-Control-Allow-Headers response header generated from XMLHttpRequest/resources/corsenabled.py not including Content-Type. (Why they pass in Gecko anyway without this change I don’t understand.)

@annevk
Copy link
Member

annevk commented Feb 22, 2017

I think what we should do instead is invert the pass condition there and file a bug against Gecko as Gecko violates CORS there.

@annevk
Copy link
Member

annevk commented Feb 22, 2017

Because https://fetch.spec.whatwg.org/#cors-preflight-fetch-0 step 6.9 only allows it to be omitted if its safelisted, which that particular value is not.

@annevk
Copy link
Member

annevk commented Mar 8, 2017

Closing this in favor of my PR to solve this issue, which ends up highlighting the problem in Firefox. Two tests still fail in WebKit but that seems like a bug.

@annevk annevk closed this Mar 8, 2017
annevk added a commit that referenced this pull request Mar 9, 2017
annevk added a commit that referenced this pull request Mar 9, 2017
@annevk annevk deleted the sideshowbarker/xhr-cors-allow-content-type branch March 9, 2017 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants