Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 887693002: Lower Received MIME type when creating a response blob. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 06aef4ff7efaf20ba5cf6361ae6551a708d2d55a..8f73f6d5f59a46896b09df1c5b0819e457f62b01 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -437,7 +437,7 @@ Blob* XMLHttpRequest::responseBlob()
if (m_binaryResponseBuilder && m_binaryResponseBuilder->size()) {
size = m_binaryResponseBuilder->size();
blobData->appendBytes(m_binaryResponseBuilder->data(), size);
- blobData->setContentType(finalResponseMIMETypeWithFallback());
+ blobData->setContentType(finalResponseMIMETypeWithFallback().lower());
m_binaryResponseBuilder.clear();
}
m_responseBlob = Blob::create(BlobDataHandle::create(blobData.release(), size));
@@ -1517,7 +1517,7 @@ PassRefPtr<BlobDataHandle> XMLHttpRequest::createBlobDataHandleFromResponse()
// FIXME: finalResponseMIMETypeWithFallback() defaults to
// text/xml which may be incorrect. Replace it with
// finalResponseMIMEType() after compatibility investigation.
- blobData->setContentType(finalResponseMIMETypeWithFallback());
+ blobData->setContentType(finalResponseMIMETypeWithFallback().lower());
}
return BlobDataHandle::create(blobData.release(), m_lengthDownloadedToFile);
}
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/response-blob-mimetype-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698