| Index: Source/core/xml/XMLHttpRequest.cpp
|
| diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
|
| index ee407bcf459a6183fcf587a29e27176344d0836e..1f03e6efd4eaa48d9477c4c64a0ecf142cb5ab9c 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 = 0;
|
| }
|
|
|