| Index: third_party/WebKit/WebCore/xml/XMLHttpRequest.cpp
|
| ===================================================================
|
| --- third_party/WebKit/WebCore/xml/XMLHttpRequest.cpp (revision 11154)
|
| +++ third_party/WebKit/WebCore/xml/XMLHttpRequest.cpp (working copy)
|
| @@ -1275,13 +1275,16 @@
|
| if (!m_responseEncoding.isEmpty())
|
| m_decoder = TextResourceDecoder::create("text/plain", m_responseEncoding);
|
| // allow TextResourceDecoder to look inside the m_response if it's XML or HTML
|
| - else if (responseIsXML())
|
| + else if (responseIsXML()) {
|
| m_decoder = TextResourceDecoder::create("application/xml");
|
| - else if (responseMIMEType() == "text/html")
|
| + // Don't stop on encoding errors, unlike it is done for other kinds of XML resources. This matches the behavior of previous WebKit versions, Firefox and Opera.
|
| + m_decoder->useLenientXMLDecoding();
|
| + } else if (responseMIMEType() == "text/html")
|
| m_decoder = TextResourceDecoder::create("text/html", "UTF-8");
|
| else
|
| m_decoder = TextResourceDecoder::create("text/plain", "UTF-8");
|
| }
|
| +
|
| if (!len)
|
| return;
|
|
|
|
|