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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 1027623003: Archive loading should be case insensitive to mimetype "multipart/related" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: .mht uploaded as binary Created 5 years, 8 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
Index: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index c1fb1efacef16ce0afedc16f71715d781a7cc3a1..23d5ec9197acc0cd384b638d8f36e33fe0c86074 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -74,7 +74,7 @@ namespace blink {
static bool isArchiveMIMEType(const String& mimeType)
{
- return mimeType == "multipart/related";
+ return equalIgnoringCase("multipart/related", mimeType);
}
DocumentLoader::DocumentLoader(LocalFrame* frame, const ResourceRequest& req, const SubstituteData& substituteData)
@@ -386,7 +386,7 @@ bool DocumentLoader::shouldContinueForResponse() const
return false;
// Prevent remote web archives from loading because they can claim to be from any domain and thus avoid cross-domain security checks.
- if (equalIgnoringCase("multipart/related", m_response.mimeType()) && !SchemeRegistry::shouldTreatURLSchemeAsLocal(m_request.url().protocol()))
+ if (isArchiveMIMEType(m_response.mimeType()) && !SchemeRegistry::shouldTreatURLSchemeAsLocal(m_request.url().protocol()))
return false;
return true;
« no previous file with comments | « LayoutTests/mhtml/mhtml-with-capital-mimetype-loading-expected.html ('k') | Source/platform/mhtml/MHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698