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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp

Issue 2975623002: Fix: Loading cid: resources in WebView. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
index c825a15e2421924521427e183b6e29dba6b63690..8a8d55d128cb62307b386391ae22aaf765f0ab47 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -644,9 +644,13 @@ Resource* ResourceFetcher::RequestResource(
params.Options().initiator_info.name);
}
- // An URL with the "cid" scheme can only be handled by an MHTML Archive.
- // Abort the request when there is none.
- if (!archive_ && resource_request.Url().ProtocolIs(kContentIdScheme))
+ // A main resource request with the "cid" scheme can only be handled by an
+ // MHTML Archive. Abort the request when there is none.
+ // Please note that there is some embedder of WebView that are using
clamy 2017/07/07 16:14:22 nit: s/Please note/Note: nit: s/is some embedder/a
arthursonzogni 2017/07/10 09:03:32 Done.
+ // Content-ID URLs for sub-resources, even without any MHTMLArchive.
+ // Please see https://crbug.com/739658.
+ if (!archive_ && factory.GetType() == Resource::kMainResource &&
clamy 2017/07/07 16:14:22 nit: this if now needs braces.
arthursonzogni 2017/07/10 09:03:32 Done.
+ resource_request.Url().ProtocolIs(kContentIdScheme))
return nullptr;
bool is_data_url = resource_request.Url().ProtocolIsData();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698