| Index: Source/core/inspector/NetworkResourcesData.cpp
|
| diff --git a/Source/core/inspector/NetworkResourcesData.cpp b/Source/core/inspector/NetworkResourcesData.cpp
|
| index 0cd8d6832a1635a3be05a50c6748599cef4b34d2..74b269a93c1fa464a95bdae71074dba5ae9cf24d 100644
|
| --- a/Source/core/inspector/NetworkResourcesData.cpp
|
| +++ b/Source/core/inspector/NetworkResourcesData.cpp
|
| @@ -157,15 +157,19 @@ void NetworkResourcesData::resourceCreated(const String& requestId, const String
|
| static PassOwnPtr<TextResourceDecoder> createOtherResourceTextDecoder(const String& mimeType, const String& textEncodingName)
|
| {
|
| OwnPtr<TextResourceDecoder> decoder;
|
| - if (!textEncodingName.isEmpty())
|
| + if (!textEncodingName.isEmpty()) {
|
| decoder = TextResourceDecoder::create("text/plain", textEncodingName);
|
| - else if (DOMImplementation::isXMLMIMEType(mimeType.lower())) {
|
| - decoder = TextResourceDecoder::create("application/xml");
|
| - decoder->useLenientXMLDecoding();
|
| - } else if (equalIgnoringCase(mimeType, "text/html"))
|
| - decoder = TextResourceDecoder::create("text/html", "UTF-8");
|
| - else if (mimeType == "text/plain")
|
| - decoder = TextResourceDecoder::create("text/plain", "ISO-8859-1");
|
| + } else {
|
| + String mimeTypeLower = mimeType.lower();
|
| + if (DOMImplementation::isXMLMIMEType(mimeTypeLower)) {
|
| + decoder = TextResourceDecoder::create("application/xml");
|
| + decoder->useLenientXMLDecoding();
|
| + } else if (equalIgnoringCase(mimeType, "text/html")) {
|
| + decoder = TextResourceDecoder::create("text/html", "UTF-8");
|
| + } else if (DOMImplementation::isTextMIMEType(mimeTypeLower)) {
|
| + decoder = TextResourceDecoder::create("text/plain", DOMImplementation::getTextDefaultEncodingName(mimeTypeLower));
|
| + }
|
| + }
|
| return decoder.release();
|
| }
|
|
|
|
|