XHR should use the Content-Type extracted from the body only when there is no Content-Type request header set |
|||
Issue descriptionTested by https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/setrequestheader-content-type.htm It's been broken since https://chromium.googlesource.com/chromium/src/+/1d37e5f234393f710191656f6cbf3024543f1c96%5E%21/third_party/WebKit/WebCore/xml/XMLHttpRequest.cpp https://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.58;r2=1.59;f=h already specified it to use set/not-set. Reported from MS Edge team. Thanks.
,
Jul 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ce0a0542f8452b90aa3d21d2c8843dff69680040 commit ce0a0542f8452b90aa3d21d2c8843dff69680040 Author: Takeshi Yoshino <tyoshino@chromium.org> Date: Tue Jul 25 20:43:16 2017 [XHR] Use the Content-Type extracted from the body only when there is no Content-Type request header set This patch also changes the WPT files: - replaced responseType with actual as it's confusing with the responseType attribute of the XHR - Adds one more Blob test that passes a type argument to the Blob constructor to really check that setRequestHeader("") is respected - changed the HTTP header field validation in inspect-headers.py to accept a header with no space right next to the colon. This is spec conformant and Chrome does so. See the OWS in the header-field ABNF in RFC 7230. This patch fixes the corresponding test items in setrequestheader-content-type.htm but there are still some items failing in it. So, we cannot remove it from TestExpectations yet. Bug: 746265 , 626703 Change-Id: I9e31453f5b046da336ab3af99d931277100c1d2e Reviewed-on: https://chromium-review.googlesource.com/577341 Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#489418} [modify] https://crrev.com/ce0a0542f8452b90aa3d21d2c8843dff69680040/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/ce0a0542f8452b90aa3d21d2c8843dff69680040/third_party/WebKit/LayoutTests/external/wpt/XMLHttpRequest/resources/inspect-headers.py [add] https://crrev.com/ce0a0542f8452b90aa3d21d2c8843dff69680040/third_party/WebKit/LayoutTests/external/wpt/XMLHttpRequest/setrequestheader-content-type-expected.txt [modify] https://crrev.com/ce0a0542f8452b90aa3d21d2c8843dff69680040/third_party/WebKit/LayoutTests/external/wpt/XMLHttpRequest/setrequestheader-content-type.htm [modify] https://crrev.com/ce0a0542f8452b90aa3d21d2c8843dff69680040/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp [modify] https://crrev.com/ce0a0542f8452b90aa3d21d2c8843dff69680040/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h
,
Jul 26 2017
,
Sep 13 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by tyoshino@chromium.org
, Jul 19 2017