WebKit Bugzilla
Attachment 349291 Details for
Bug 189465
: XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189465-20180909212702.patch (text/plain), 6.55 KB, created by
Rob Buis
on 2018-09-09 12:27:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2018-09-09 12:27:02 PDT
Size:
6.55 KB
patch
obsolete
>Subversion Revision: 235836 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8375217f8686e250bb3a23429f0200fb573ffe7e..6f6da046488de7150ca950d83e94858f68a45e53 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-09-09 Rob Buis <rbuis@igalia.com> >+ >+ XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header >+ https://bugs.webkit.org/show_bug.cgi?id=189465 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The xhr spec changed [1] 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 >+ >+ 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): >+ > 2018-09-08 Andy Estes <aestes@apple.com> > > [Apple Pay] Dispatch a paymentmethodchange event when the payment method changes >diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp >index a9ab362ef69929898a8e2f7e851494f3bde39636..1faf43b480d0b44a670153ff3b7f0297e84eed00 100644 >--- a/Source/WebCore/xml/XMLHttpRequest.cpp >+++ b/Source/WebCore/xml/XMLHttpRequest.cpp >@@ -965,8 +965,6 @@ void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon > void XMLHttpRequest::didReceiveResponse(unsigned long, const ResourceResponse& response) > { > m_response = response; >- if (!m_mimeTypeOverride.isEmpty()) >- m_response.setHTTPHeaderField(HTTPHeaderName::ContentType, m_mimeTypeOverride); > } > > static inline bool shouldDecodeResponse(XMLHttpRequest::ResponseType type) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 12471961363d0e97374dca30507edb4c9bd0d273..2cf60e1525b3ab0e07e277184c2be4bcdb0963ad 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2018-09-09 Rob Buis <rbuis@igalia.com> >+ >+ XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header >+ https://bugs.webkit.org/show_bug.cgi?id=189465 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2018-09-08 Wenson Hsieh <wenson_hsieh@apple.com> > > REGRESSION (r235153): [iOS] Can't move selection start grabber when selecting text in a subframe >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index c0bc2d610ae0277a6141ba94ec165161ccf7f54c..1bd1b4e8587f6df119bf32846f2f8803962e62ee 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,12 @@ >+2018-09-09 Rob Buis <rbuis@igalia.com> >+ >+ XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header >+ https://bugs.webkit.org/show_bug.cgi?id=189465 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt: >+ > 2018-09-07 Youenn Fablet <youenn@apple.com> > > Add support for unified plan transceivers >diff --git a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt >index 0fbe1e884322604095bbc80bdcecad679a4bce8c..880b205f89c2b0ae920340dc50907621a7070667 100644 >--- a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt >+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt >@@ -1,9 +1,9 @@ >-This tests that XMLHttpRequest overrideMimeType() properly updates the Content-Type header for the response. >+This tests that XMLHttpRequest overrideMimeType() does not update the Content-Type header for the response. > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS xhr.getResponseHeader("Content-Type") is "text/xml;charset=GBK" >+PASS xhr.getResponseHeader("Content-Type") is "application/xml" > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html >index 9c2b96883cfbc2699d1156405855b6789b74bfe9..04add7a5d82b707707cf871b26dd2112ba18d0ee 100644 >--- a/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html >+++ b/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html >@@ -5,7 +5,7 @@ > </head> > <body> > <script> >- description('This tests that XMLHttpRequest overrideMimeType() properly updates the Content-Type header for the response.'); >+ description('This tests that XMLHttpRequest overrideMimeType() does not update the Content-Type header for the response.'); > window.jsTestIsAsync = true; > > var xhr = new XMLHttpRequest(); >@@ -13,7 +13,7 @@ > > xhr.onreadystatechange = function () { > if (xhr.readyState == xhr.LOADING) { >- shouldBe('xhr.getResponseHeader("Content-Type")', '"text/xml;charset=GBK"'); >+ shouldBe('xhr.getResponseHeader("Content-Type")', '"application/xml"'); > finishJSTest(); > } > } >diff --git a/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt >index b043d7e2e7872fed579f5c108c170712737f5d9d..5758656fb3d96991e3f4a449b003f19cba15099f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-invalid-mime-type-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Bogus MIME type does not override encoding assert_equals: expected "text/html;charset=windows-1252" but got "bogus" >+PASS Bogus MIME type does not override encoding > FAIL Bogus MIME type does not override encoding, 2 assert_equals: expected "ÿ" but got "\x1a" >-FAIL Bogus MIME type does override MIME type assert_equals: expected "text/xml" but got "bogus" >+PASS Bogus MIME type does override MIME type >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189465
:
349289
|
349291
|
349296
|
349299