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

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: Updated with small modification 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 ee5bdd90d001dbed3d1e44d18044f7af617312e7..cee34ad9502d9e14a1b26c5e6f32c7f910433081 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -73,7 +73,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)
@@ -385,7 +385,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;

Powered by Google App Engine
This is Rietveld 408576698