Title: [236197] releases/WebKitGTK/webkit-2.22
- Revision
- 236197
- Author
- [email protected]
- Date
- 2018-09-19 06:49:11 -0700 (Wed, 19 Sep 2018)
Log Message
Merge r236031 - XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
https://bugs.webkit.org/show_bug.cgi?id=189627
Reviewed by Alexey Proskuryakov.
Right now we return an empty Blob without type when the response is empty, but
it should always include the type [1].
Test: web-platform-tests/xhr/overridemimetype-blob.html
[1] https://xhr.spec.whatwg.org/#blob-response
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createResponseBlob):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog (236196 => 236197)
--- releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog 2018-09-19 13:39:39 UTC (rev 236196)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog 2018-09-19 13:49:11 UTC (rev 236197)
@@ -1,3 +1,13 @@
+2018-09-15 Rob Buis <[email protected]>
+
+ XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
+ https://bugs.webkit.org/show_bug.cgi?id=189627
+
+ Reviewed by Alexey Proskuryakov.
+
+ * fast/files/xhr-response-blob-expected.txt:
+ * fast/files/xhr-response-blob.html:
+
2018-09-10 Philippe Normand <[email protected]>
[GStreamer] Several media related tests timing out around the same revision
Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/fast/files/xhr-response-blob-expected.txt (236196 => 236197)
--- releases/WebKitGTK/webkit-2.22/LayoutTests/fast/files/xhr-response-blob-expected.txt 2018-09-19 13:39:39 UTC (rev 236196)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/fast/files/xhr-response-blob-expected.txt 2018-09-19 13:49:11 UTC (rev 236197)
@@ -16,5 +16,5 @@
PASS xhr.responseType is "blob"
PASS xhr.response is null
PASS xhr.response instanceof Blob is true
-PASS xhr.response.type is ""
+PASS xhr.response.type is "application/octet-stream"
Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/fast/files/xhr-response-blob.html (236196 => 236197)
--- releases/WebKitGTK/webkit-2.22/LayoutTests/fast/files/xhr-response-blob.html 2018-09-19 13:39:39 UTC (rev 236196)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/fast/files/xhr-response-blob.html 2018-09-19 13:49:11 UTC (rev 236197)
@@ -34,7 +34,7 @@
testBlob("resources/UTF8.txt", "text/plain", function() {
testBlob("resources/does_not_exist.txt", "", function() {
- testBlob("resources/empty-file", "", function() {
+ testBlob("resources/empty-file", "application/octet-stream", function() {
if (window.testRunner)
testRunner.notifyDone();
})
Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/ChangeLog (236196 => 236197)
--- releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/ChangeLog 2018-09-19 13:39:39 UTC (rev 236196)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/ChangeLog 2018-09-19 13:49:11 UTC (rev 236197)
@@ -1,3 +1,12 @@
+2018-09-15 Rob Buis <[email protected]>
+
+ XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
+ https://bugs.webkit.org/show_bug.cgi?id=189627
+
+ Reviewed by Alexey Proskuryakov.
+
+ * web-platform-tests/xhr/overridemimetype-blob-expected.txt:
+
2018-09-10 Rob Buis <[email protected]>
XMLHttpRequest: overrideMimeType should not update the response's "Content-Type" header
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (236196 => 236197)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog 2018-09-19 13:39:39 UTC (rev 236196)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog 2018-09-19 13:49:11 UTC (rev 236197)
@@ -1,3 +1,20 @@
+2018-09-15 Rob Buis <[email protected]>
+
+ XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
+ https://bugs.webkit.org/show_bug.cgi?id=189627
+
+ Reviewed by Alexey Proskuryakov.
+
+ Right now we return an empty Blob without type when the response is empty, but
+ it should always include the type [1].
+
+ Test: web-platform-tests/xhr/overridemimetype-blob.html
+
+ [1] https://xhr.spec.whatwg.org/#blob-response
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::createResponseBlob):
+
2018-09-13 Ms2ger <[email protected]>
[GLib] Fix format string in KeyedEncoderGlib::beginObject().
Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/xml/XMLHttpRequest.cpp (236196 => 236197)
--- releases/WebKitGTK/webkit-2.22/Source/WebCore/xml/XMLHttpRequest.cpp 2018-09-19 13:39:39 UTC (rev 236196)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/xml/XMLHttpRequest.cpp 2018-09-19 13:49:11 UTC (rev 236197)
@@ -220,12 +220,10 @@
ASSERT(responseType() == ResponseType::Blob);
ASSERT(doneWithoutErrors());
- if (!m_binaryResponseBuilder)
- return Blob::create();
-
// FIXME: We just received the data from NetworkProcess, and are sending it back. This is inefficient.
Vector<uint8_t> data;
- data.append(m_binaryResponseBuilder->data(), m_binaryResponseBuilder->size());
+ if (m_binaryResponseBuilder)
+ data.append(m_binaryResponseBuilder->data(), m_binaryResponseBuilder->size());
m_binaryResponseBuilder = nullptr;
String normalizedContentType = Blob::normalizedContentType(responseMIMEType()); // responseMIMEType defaults to text/xml which may be incorrect.
return Blob::create(WTFMove(data), normalizedContentType);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes