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

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

Issue 1698973002: Exempt Save-Data header from CORS preflight request check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added layout test Created 4 years, 10 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/xmlhttprequest/access-control-preflight-data-saver-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/FetchUtils.cpp
diff --git a/third_party/WebKit/Source/core/fetch/FetchUtils.cpp b/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
index 1b314a1862a1c5a8aed4c9b1b04955ee22aab0ee..658f3ad2682d4f8ae986e2876a441a095fb0e5f2 100644
--- a/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
+++ b/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
@@ -90,10 +90,13 @@ bool FetchUtils::isSimpleHeader(const AtomicString& name, const AtomicString& va
// `Content-Type` and value, once parsed, is one of
// `application/x-www-form-urlencoded`, `multipart/form-data`, and
// `text/plain`."
+ // Treat 'Save-Data' as a simple header, since it is added by Chrome when
+ // Data Saver feature is enabled.
if (equalIgnoringCase(name, "accept")
|| equalIgnoringCase(name, "accept-language")
- || equalIgnoringCase(name, "content-language"))
+ || equalIgnoringCase(name, "content-language")
+ || equalIgnoringCase(name, "save-data"))
return true;
if (equalIgnoringCase(name, "content-type")) {
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698