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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2276453002: Print the source origin rather than the origin of the target on CORS check failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted accidental expectation change Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/http/tests/security/video-poster-cross-origin-crash2-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 143bb107473035cb3e9ba5caad64db355803254b..5ff0d0d3861a31c60532f733a76016d704734229 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -253,7 +253,7 @@ bool ResourceFetcher::canAccessResponse(Resource* resource, const ResourceRespon
resource->setCORSFailed();
if (!forPreload) {
String resourceType = Resource::resourceTypeToString(resource->getType(), resource->options().initiatorInfo);
- context().addConsoleMessage("Access to " + resourceType + " at '" + response.url().getString() + "' from origin '" + SecurityOrigin::create(response.url())->toString() + "' has been blocked by CORS policy: " + errorDescription);
+ context().addConsoleMessage("Access to " + resourceType + " at '" + response.url().getString() + "' from origin '" + sourceOrigin->toString() + "' has been blocked by CORS policy: " + errorDescription);
}
return false;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/video-poster-cross-origin-crash2-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698