| Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| index 23687c66cd72f9cdc7ed7f221b6b4a1ee6af8d53..4ec8b53c167d52ccc0b192692cb0dd915f7b324e 100644
|
| --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| @@ -1551,11 +1551,8 @@ PassOwnPtr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
|
| if (m_responseTypeCode == ResponseTypeJSON)
|
| return TextResourceDecoder::create("application/json", "UTF-8");
|
|
|
| - if (!m_finalResponseCharset.isEmpty()) {
|
| - OwnPtr<TextResourceDecoder> decoder(TextResourceDecoder::create("text/plain"));
|
| - decoder->setEncoding(WTF::TextEncoding(m_finalResponseCharset), TextResourceDecoder::EncodingFromHTTPHeader);
|
| - return decoder.release();
|
| - }
|
| + if (!m_finalResponseCharset.isEmpty())
|
| + return TextResourceDecoder::create("text/plain", m_finalResponseCharset);
|
|
|
| // allow TextResourceDecoder to look inside the m_response if it's XML or HTML
|
| if (responseIsXML()) {
|
|
|