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

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

Issue 2750433002: Do not treat substitute-data resources as having successful HTTP status codes. (Closed)
Patch Set: Created 3 years, 9 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: 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 c9f7f26c3ae22ddc0fc923067889546e1db2eda9..c0c66169098520a5b3bccc8bbdd6732fac66dd98 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -387,8 +387,10 @@ Resource* ResourceFetcher::resourceForStaticData(
}
ResourceResponse response(url, mimetype, data->size(), charset);
- response.setHTTPStatusCode(200);
- response.setHTTPStatusText("OK");
+ if (!substituteData.isValid() && url.protocolIsData()) {
+ response.setHTTPStatusCode(200);
+ response.setHTTPStatusText("OK");
+ }
Resource* resource = factory.create(request.resourceRequest(),
request.options(), request.charset());
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698