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

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

Issue 21532002: CORS: Handle error HTTP status code 4XX/5XX in preflight requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 | « Source/core/loader/CrossOriginAccessControl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp
index 2787d98be9b4a1308929ac2138fa9ef60857244f..5471fdb5f057992e9d29cf3ec8990f1026593ac6 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -286,6 +286,11 @@ void DocumentThreadableLoader::didReceiveResponse(unsigned long identifier, cons
return;
}
+ if (!passesPreflightStatusCheck(response, accessControlErrorDescription)) {
+ preflightFailure(identifier, response.url().string(), accessControlErrorDescription);
+ return;
+ }
+
OwnPtr<CrossOriginPreflightResultCacheItem> preflightResult = adoptPtr(new CrossOriginPreflightResultCacheItem(m_options.allowCredentials));
if (!preflightResult->parse(response, accessControlErrorDescription)
|| !preflightResult->allowsCrossOriginMethod(m_actualRequest->httpMethod(), accessControlErrorDescription)
« no previous file with comments | « Source/core/loader/CrossOriginAccessControl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698