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

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

Issue 1356353003: Relax cross-origin partial response requirements for CORS presence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental php change. Created 5 years, 2 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/media/resources/serve-video.php ('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/loader/DocumentThreadableLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
index adb2523a114ca4adb00eedd0998559d3eaa2e2df..c1276fe57d176a39e1d420b86132eacbc94f90d8 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -160,8 +160,13 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document& document, Threadabl
// create a new one, and copy these headers.
const HTTPHeaderMap& headerMap = request.httpHeaderFields();
for (const auto& header : headerMap) {
- if (FetchUtils::isSimpleHeader(header.key, header.value))
+ if (FetchUtils::isSimpleHeader(header.key, header.value)) {
m_simpleRequestHeaders.add(header.key, header.value);
+ } else if (equalIgnoringCase(header.key, "range") && m_options.crossOriginRequestPolicy == UseAccessControl && m_options.preflightPolicy == PreventPreflight) {
+ // Allow an exception for the "range" header for when CORS callers request no preflight, this ensures cross-origin
+ // redirects work correctly for crossOrigin enabled WebURLRequest::RequestContextVideo type requests.
+ m_simpleRequestHeaders.add(header.key, header.value);
+ }
}
// DocumentThreadableLoader is used by all javascript initiated fetch, so
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/media/resources/serve-video.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698