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

Issue 1859313002: Save-Data should not be added to CORS Access-Control-Request-Headers (Closed)

Created:
4 years, 8 months ago by Raj
Modified:
4 years, 8 months ago
CC:
bengr, blink-reviews, blink-worker-reviews_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, gavinp+loader_chromium.org, horo+watch_chromium.org, jam, Nate Chapin, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, loading-reviews+fetch_chromium.org, michaeln, nhiroki, serviceworker-reviews, tyoshino+watch_chromium.org, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Exclude Save-Data from CORS Access-Control-Request-Headers When data saver is enabled, and a cross-origin fetch by a webpage is intercepted by a serviceworker and the serviceworker does a fetch, the preflight request will have save-data added to Access-Control-Request-Headers. As a short-term fix save-data will be excluded from ACRH header. Later all simple headers will be excluded from ACRH header. https://github.com/whatwg/fetch/issues/249 https://crbug.com/601092 BUG=599704 Committed: https://crrev.com/dcc9b2874edf8fd00070eb4f14176288535101a2 Cr-Commit-Position: refs/heads/master@{#385637}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed falken comments #

Total comments: 10

Patch Set 3 : Addressed bengr comments #

Total comments: 2

Patch Set 4 : Addressed phajdan comments #

Patch Set 5 : rebased #

Total comments: 2

Patch Set 6 : Addressed kinuko comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -4 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 3 chunks +78 lines, -0 lines 0 comments Download
A content/test/data/service_worker/fetch_cross_origin.html View 1 1 chunk +17 lines, -0 lines 0 comments Download
A + content/test/data/service_worker/fetch_event_respond_with_fetch.js View 1 1 chunk +2 lines, -4 lines 0 comments Download
M net/test/embedded_test_server/http_request.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/test/embedded_test_server/http_request.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (8 generated)
Raj
PTAL falken: service_worker_browsertest.cc kinuko: content/test/data/service_worker/* CrossOriginAccessControl.cpp phajdan: net/test/embedded_test_server/* Thanks
4 years, 8 months ago (2016-04-06 04:23:35 UTC) #2
falken
This looks good. In the CL description, please link to the github issue about removing ...
4 years, 8 months ago (2016-04-06 04:41:37 UTC) #3
Raj
Addressed comments. https://codereview.chromium.org/1859313002/diff/1/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/1859313002/diff/1/content/browser/service_worker/service_worker_browsertest.cc#newcode234 content/browser/service_worker/service_worker_browsertest.cc:234: auto it_acrh = request.headers.find("Access-Control-Request-Headers"); On 2016/04/06 04:41:36, ...
4 years, 8 months ago (2016-04-06 05:08:42 UTC) #5
falken
lgtm
4 years, 8 months ago (2016-04-06 05:13:27 UTC) #6
bengr
https://codereview.chromium.org/1859313002/diff/20001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/1859313002/diff/20001/content/browser/service_worker/service_worker_browsertest.cc#newcode221 content/browser/service_worker/service_worker_browsertest.cc:221: scoped_ptr<net::test_server::HttpResponse> #include "base/memory/scoped_ptr.h" https://codereview.chromium.org/1859313002/diff/20001/content/browser/service_worker/service_worker_browsertest.cc#newcode1148 content/browser/service_worker/service_worker_browsertest.cc:1148: IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, CrossOriginFetchWithSaveData) { Please ...
4 years, 8 months ago (2016-04-06 16:50:30 UTC) #8
Raj
Addressed bengr comments. https://codereview.chromium.org/1859313002/diff/20001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/1859313002/diff/20001/content/browser/service_worker/service_worker_browsertest.cc#newcode221 content/browser/service_worker/service_worker_browsertest.cc:221: scoped_ptr<net::test_server::HttpResponse> On 2016/04/06 16:50:30, bengr wrote: ...
4 years, 8 months ago (2016-04-06 17:45:20 UTC) #10
bengr
lgtm.
4 years, 8 months ago (2016-04-06 17:56:54 UTC) #11
Paweł Hajdan Jr.
LGTM w/comment https://codereview.chromium.org/1859313002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/1859313002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode1184 content/browser/service_worker/service_worker_browsertest.cc:1184: TitleWatcher title_watcher(shell()->web_contents(), title); Shouldn't TitleWatcher be instantiated ...
4 years, 8 months ago (2016-04-06 20:15:46 UTC) #12
Raj
Addressed phajdan comments https://codereview.chromium.org/1859313002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/1859313002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode1184 content/browser/service_worker/service_worker_browsertest.cc:1184: TitleWatcher title_watcher(shell()->web_contents(), title); On 2016/04/06 20:15:46, ...
4 years, 8 months ago (2016-04-06 22:04:10 UTC) #13
kinuko
lgtm https://codereview.chromium.org/1859313002/diff/80001/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp File third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp (right): https://codereview.chromium.org/1859313002/diff/80001/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp#newcode100 third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp:100: // TODO(crbug.com/601092): Longer-term all simple headers should TODO(name): ...
4 years, 8 months ago (2016-04-07 01:12:28 UTC) #14
Raj
Thanks https://codereview.chromium.org/1859313002/diff/80001/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp File third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp (right): https://codereview.chromium.org/1859313002/diff/80001/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp#newcode100 third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp:100: // TODO(crbug.com/601092): Longer-term all simple headers should On ...
4 years, 8 months ago (2016-04-07 01:18:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1859313002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1859313002/100001
4 years, 8 months ago (2016-04-07 01:18:49 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-04-07 03:00:04 UTC) #20
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 03:01:38 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/dcc9b2874edf8fd00070eb4f14176288535101a2
Cr-Commit-Position: refs/heads/master@{#385637}

Powered by Google App Engine
This is Rietveld 408576698