Summary: | XMLHttpRequest: do not sniff text/html, and do not sniff XML when responseType is set to "text" | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anne van Kesteren <annevk> | ||||||||||||||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | achristensen, ap, buildbot, cdumez, commit-queue, rniwa, sam, webkit-bug-importer, youennf | ||||||||||||||||
Priority: | P2 | Keywords: | BlinkMergeCandidate, InRadar | ||||||||||||||||
Version: | Safari Technology Preview | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Bug Depends on: | 178172 | ||||||||||||||||||
Bug Blocks: | |||||||||||||||||||
Attachments: |
|
Description
Anne van Kesteren
2017-02-22 06:53:58 PST
Created attachment 323424 [details]
WIP Patch
Created attachment 323453 [details]
Patch
Created attachment 323455 [details]
Patch
Comment on attachment 323455 [details] Patch Attachment 323455 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4827931 New failing tests: http/tests/xmlhttprequest/response-encoding.html Created attachment 323461 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 323455 [details] Patch Attachment 323455 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4827990 New failing tests: http/tests/xmlhttprequest/response-encoding.html Created attachment 323462 [details]
Archive of layout-test-results from ews117 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 323455 [details] Patch Attachment 323455 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4828066 New failing tests: http/tests/xmlhttprequest/response-encoding.html Created attachment 323463 [details]
Archive of layout-test-results from ews100 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 323465 [details]
Patch
Patch seems fine. I guess the compat issue is really low since Chrome probably shipped this a while ago. (In reply to youenn fablet from comment #12) > Patch seems fine. > I guess the compat issue is really low since Chrome probably shipped this a > while ago. Full disclosure, the Blink patch landed yesterday so they did not ship this yet. They will definitely ship it before us though and we can always revert if they run into trouble. Do you know what IE/MS are doing here? IE/Firefox... (In reply to youenn fablet from comment #15) > IE/Firefox... I do not know about IE but Firefox aligned with the spec. Info available at: - https://github.com/w3c/web-platform-tests/pull/4935 - https://bugzilla.mozilla.org/show_bug.cgi?id=1341260 So basically, both Firefox and Chrome aligned. Anne may know about IE / Edge. Comment on attachment 323465 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323465&action=review > Source/WebCore/xml/XMLHttpRequest.cpp:1062 > + } Don't we need to check if the response is HTML? We used to do that in the old code. Comment on attachment 323465 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323465&action=review >> Source/WebCore/xml/XMLHttpRequest.cpp:1062 >> + } > > Don't we need to check if the response is HTML? We used to do that in the old code. No, if I add this check then a WPT subtest would no longer start passing. Also note that Chrome is not doing the HTML check either in this case. > LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt:3 > +PASS XMLHttpRequest: responseText decoding (text/html %3C!doctype%20html%3E%3Cmeta%20charset%3Dwindows-1252%3E%3Cx%3E%e6%a9%9f%3C%2Fx%3E empty) This subtest would fail again. Comment on attachment 323465 [details] Patch Clearing flags on attachment: 323465 Committed r223217: <https://trac.webkit.org/changeset/223217> All reviewed patches have been landed. Closing bug. |