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

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

Issue 151653004: Implemented Document.contentType (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase and fixing tests on windows Created 6 years, 9 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 | « Source/core/dom/Document.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index c043707688049ee47e6c2b286431a0b8c03a6bc4..1a7e5435f1b653355571929f6f154c736b66081c 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -242,7 +242,8 @@ Document* XMLHttpRequest::responseXML(ExceptionState& exceptionState)
return 0;
if (!m_createdDocument) {
- bool isHTML = equalIgnoringCase(responseMIMEType(), "text/html");
+ AtomicString mimeType = responseMIMEType();
+ bool isHTML = equalIgnoringCase(mimeType, "text/html");
// The W3C spec requires the final MIME type to be some valid XML type, or text/html.
// If it is text/html, then the responseType of "document" must have been supplied explicitly.
@@ -260,6 +261,7 @@ Document* XMLHttpRequest::responseXML(ExceptionState& exceptionState)
m_responseDocument->setContent(m_responseText.flattenToString());
m_responseDocument->setSecurityOrigin(securityOrigin());
m_responseDocument->setContextFeatures(document()->contextFeatures());
+ m_responseDocument->setMimeType(mimeType);
if (!m_responseDocument->wellFormed())
m_responseDocument = nullptr;
}
« no previous file with comments | « Source/core/dom/Document.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698