-
Notifications
You must be signed in to change notification settings - Fork 133
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
Look at overrideMimeType() again #157
Comments
The tentative plan here is that |
Note that I think right now this does not properly translate charset from an encoding label to an encoding name, although I haven't properly traced through how override charset is used to figure out if maybe using a label is OK. |
Hmm yeah, it'd be good to test that as part of #174. In particular if unrecognized labels get skipped somehow. I'll be away for two weeks so probably won't get around to it until I'm back. |
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449
…ntent-Type" header https://bugs.webkit.org/show_bug.cgi?id=189465 Patch by Rob Buis <[email protected]> on 2018-09-10 Reviewed by Frédéric Wang. LayoutTests/imported/w3c: * web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt: Source/WebCore: The xhr spec changed [1, 2] so that overrideMimeType should not update the response's "Content-Type" header anymore. Behavior matches Firefox and Chrome. [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-overridemimetype [2] whatwg/xhr#157 Tests: http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html web-platform-tests/xhr/overridemimetype-invalid-mime-type.htm * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveResponse): LayoutTests: Change existing test to reflect new behavior. * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt: * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@235844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…e response's "Content-Type" header https://bugs.webkit.org/show_bug.cgi?id=189465 Patch by Rob Buis <[email protected]> on 2018-09-10 Reviewed by Frédéric Wang. LayoutTests/imported/w3c: * web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt: Source/WebCore: The xhr spec changed [1, 2] so that overrideMimeType should not update the response's "Content-Type" header anymore. Behavior matches Firefox and Chrome. [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-overridemimetype [2] whatwg/xhr#157 Tests: http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html web-platform-tests/xhr/overridemimetype-invalid-mime-type.htm * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveResponse): LayoutTests: Change existing test to reflect new behavior. * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt: * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html: git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.22@236185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…e response's "Content-Type" header https://bugs.webkit.org/show_bug.cgi?id=189465 Patch by Rob Buis <[email protected]> on 2018-09-10 Reviewed by Frédéric Wang. LayoutTests/imported/w3c: * web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt: Source/WebCore: The xhr spec changed [1, 2] so that overrideMimeType should not update the response's "Content-Type" header anymore. Behavior matches Firefox and Chrome. [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-overridemimetype [2] whatwg/xhr#157 Tests: http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html web-platform-tests/xhr/overridemimetype-invalid-mime-type.htm * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveResponse): LayoutTests: Change existing test to reflect new behavior. * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt: * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html: git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.22@236185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449 UltraBlame original commit: a743786f569a9e77f8c86a2882abee702f58f981
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449 UltraBlame original commit: a743786f569a9e77f8c86a2882abee702f58f981
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449 UltraBlame original commit: a743786f569a9e77f8c86a2882abee702f58f981
…e response's "Content-Type" header https://bugs.webkit.org/show_bug.cgi?id=189465 Patch by Rob Buis <[email protected]> on 2018-09-10 Reviewed by Frédéric Wang. LayoutTests/imported/w3c: * web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt: Source/WebCore: The xhr spec changed [1, 2] so that overrideMimeType should not update the response's "Content-Type" header anymore. Behavior matches Firefox and Chrome. [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-overridemimetype [2] whatwg/xhr#157 Tests: http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html web-platform-tests/xhr/overridemimetype-invalid-mime-type.htm * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveResponse): LayoutTests: Change existing test to reflect new behavior. * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt: * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html:
There's a test that checks that
text/xml;charset=†
is rejected and Chrome has implemented this, but I don't think any other part of the platform reuses that check. What we end up doing is ignoring non-ASCII bytes in MIME types. So we should rewriteXMLHttpRequest/overridemimetype-blob.html
and maybe change the requirements in the specification.This ties into the ever growing whatwg/mimesniff#30.
See https://bugzilla.mozilla.org/show_bug.cgi?id=918731 for more background.
The text was updated successfully, but these errors were encountered: