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

Issue 1698973002: Exempt Save-Data header from CORS preflight request check (Closed)

Created:
4 years, 10 months ago by Raj
Modified:
4 years, 10 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Exempt Save-Data header from CORS preflight request check Save-Data header is added by Chrome when Data saver feature is enabled. This header should be treated as standard header and should be exempted from CORS checks to trigger preflight request. BUG=584889 Committed: https://crrev.com/a7d87a39dd8cddc64ead9ffa1f60f79ec6776bd9 Cr-Commit-Position: refs/heads/master@{#376410}

Patch Set 1 #

Patch Set 2 : Fix in isSimpleHeader() and field trial support to disable #

Patch Set 3 : Added layout test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -7 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 chunks +9 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver.html View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-data-saver-expected.txt View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchUtils.cpp View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 19 (8 generated)
Raj
ptal, thanks yhirano: FetchHeaderList.cpp japhet: DocumentThreadableLoader.cpp
4 years, 10 months ago (2016-02-16 08:39:24 UTC) #4
yhirano
Can you add any layout tests? I think DocumentThreadableLoader is not the right place to ...
4 years, 10 months ago (2016-02-16 19:42:36 UTC) #5
yhirano
+mkwst@
4 years, 10 months ago (2016-02-16 19:43:11 UTC) #7
Raj
On 2016/02/16 19:43:11, yhirano wrote: > +mkwst@ Thanks yhirano for looking into it immediately. ptal ...
4 years, 10 months ago (2016-02-16 21:08:08 UTC) #9
Raj
ptal, Thanks
4 years, 10 months ago (2016-02-18 05:59:48 UTC) #10
yhirano
lgtm
4 years, 10 months ago (2016-02-18 17:47:16 UTC) #11
Mike West
This LGTM to land as a temporary fix, but please add a TODO to revisit ...
4 years, 10 months ago (2016-02-19 06:42:57 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698973002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698973002/60001
4 years, 10 months ago (2016-02-19 06:46:57 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 10 months ago (2016-02-19 06:53:02 UTC) #16
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/a7d87a39dd8cddc64ead9ffa1f60f79ec6776bd9 Cr-Commit-Position: refs/heads/master@{#376410}
4 years, 10 months ago (2016-02-19 06:53:56 UTC) #18
Raj
4 years, 10 months ago (2016-02-20 01:32:15 UTC) #19
Message was sent while issue was closed.
On 2016/02/19 06:42:57, Mike West wrote:
> This LGTM to land as a temporary fix, but please add a TODO to revisit this
> based on the resolution of
> https://github.com/whatwg/fetch/issues/52#issuecomment-185575815.
> 
> It's not clear to me why Blink knows anything about this header, however; it
> seems like something that should be added higher up the stack when we're
> actually making network requests.
> 
> The argument that the Service Worker should know the state of the request is a
> little strange; couldn't we expose a JavaScript API to give the worker that
> information? I'm sure there's a good reason for the requirement that I'm
> missing...

Thanks Mike,
Filed http://crbug.com/588371 for the TODO, after there is some consensus.

Powered by Google App Engine
This is Rietveld 408576698