WebKit Bugzilla
Attachment 349791 Details for
Bug 189627
: XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189627-20180914220632.patch (text/plain), 3.47 KB, created by
Rob Buis
on 2018-09-14 13:06:32 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2018-09-14 13:06:32 PDT
Size:
3.47 KB
patch
obsolete
>Subversion Revision: 236009 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a59cd8c73f1f0a8f4334faf05a08ae68ab1f7341..7c51f8cc15c551363fc257211466626217de8c66 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-09-14 Rob Buis <rbuis@igalia.com> >+ >+ XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response >+ https://bugs.webkit.org/show_bug.cgi?id=189627 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-14 Devin Rousso <webkit@devinrousso.com> > > Web Inspector: Record actions performed on ImageBitmapRenderingContext >diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp >index 8d8f83d04c55ad6b7286ef78bbf8b6449ad577e8..631ba78b74cc4a8bf3dfa9ba81de98317c4621f9 100644 >--- a/Source/WebCore/xml/XMLHttpRequest.cpp >+++ b/Source/WebCore/xml/XMLHttpRequest.cpp >@@ -220,12 +220,10 @@ Ref<Blob> XMLHttpRequest::createResponseBlob() > 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); >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 8f13dc4b14bf4ca9805cbb1e2826e14a0c2178f7..4ba8e329071e685de53529018d15dfe67ac4c17c 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,12 @@ >+2018-09-14 Rob Buis <rbuis@igalia.com> >+ >+ XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response >+ https://bugs.webkit.org/show_bug.cgi?id=189627 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/xhr/overridemimetype-blob-expected.txt: >+ > 2018-09-14 Ms2ger <Ms2ger@igalia.com> > > Remove some obsolete XHR tests >diff --git a/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt >index 4be74486caadb42834dd4a073ad46e2d36cc54c9..97330b7e99d3cbee6cd31552cb2e2bacccaae13b 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/xhr/overridemimetype-blob-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Use text/xml as fallback MIME type assert_equals: expected "text/xml" but got "" >+PASS Use text/xml as fallback MIME type > PASS Use text/xml as fallback MIME type, 2 > FAIL Loading data⦠promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...tests.forEach...')" >
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 189627
:
349791
|
349800