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

Issue 18595008: Prevents sending of 'orgin' in the "Access-Control-Request-Headers" when preflight requests are mad… (Closed)

Created:
7 years, 5 months ago by ancilgeorge
Modified:
7 years, 5 months ago
CC:
blink-reviews, dglazkov+blink, Nate Chapin, eae+blinkwatch, gavinp+loader_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Prevents sending of 'orgin' in the "Access-Control-Request-Headers" when preflight requests are made. As per the W3C CORS Spec(http://www.w3.org/TR/cors/#cross-origin-request-with-preflight-0), the "Access-Control-Request-Headers" should contain only author request headers. Origin header was set(by UA) for the actual request before the preflight request was done. Avoid setting of Origin header for the actual request in case of preflight. Origin header is anyways set for the actual request in preflightSuccess(). This makes the behavior same as Mozilla Firefox browser. R=abarth@chromium.org, kbr@chromium.org, bbudge@chromium.org BUG=258828 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154346

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Messages

Total messages: 13 (0 generated)
ancilgeorge
Please review.
7 years, 5 months ago (2013-07-12 11:38:47 UTC) #1
bbudge
https://codereview.chromium.org/18595008/diff/1/Source/core/loader/CrossOriginAccessControl.cpp File Source/core/loader/CrossOriginAccessControl.cpp (right): https://codereview.chromium.org/18595008/diff/1/Source/core/loader/CrossOriginAccessControl.cpp#newcode105 Source/core/loader/CrossOriginAccessControl.cpp:105: Why not allow a NULL securityOrigin parameter in the ...
7 years, 5 months ago (2013-07-12 19:10:11 UTC) #2
ancilgeorge
On 2013/07/12 19:10:11, bbudge1 wrote: > https://codereview.chromium.org/18595008/diff/1/Source/core/loader/CrossOriginAccessControl.cpp > File Source/core/loader/CrossOriginAccessControl.cpp (right): > > https://codereview.chromium.org/18595008/diff/1/Source/core/loader/CrossOriginAccessControl.cpp#newcode105 > ...
7 years, 5 months ago (2013-07-15 06:26:28 UTC) #3
ancilgeorge
https://codereview.chromium.org/18595008/diff/1/Source/core/loader/CrossOriginAccessControl.cpp File Source/core/loader/CrossOriginAccessControl.cpp (right): https://codereview.chromium.org/18595008/diff/1/Source/core/loader/CrossOriginAccessControl.cpp#newcode105 Source/core/loader/CrossOriginAccessControl.cpp:105: On 2013/07/12 19:10:11, bbudge1 wrote: > Why not allow ...
7 years, 5 months ago (2013-07-15 15:32:46 UTC) #4
bbudge
Just FYI, I have worked *some* in this area but am not an OWNER. https://codereview.chromium.org/18595008/diff/6001/Source/core/loader/CrossOriginAccessControl.h ...
7 years, 5 months ago (2013-07-15 17:00:25 UTC) #5
ancilgeorge
On 2013/07/15 17:00:25, bbudge1 wrote: > Just FYI, I have worked *some* in this area ...
7 years, 5 months ago (2013-07-16 06:26:13 UTC) #6
ancilgeorge
https://codereview.chromium.org/18595008/diff/6001/Source/core/loader/CrossOriginAccessControl.h File Source/core/loader/CrossOriginAccessControl.h (right): https://codereview.chromium.org/18595008/diff/6001/Source/core/loader/CrossOriginAccessControl.h#newcode48 Source/core/loader/CrossOriginAccessControl.h:48: void updateRequestForAccessControl(ResourceRequest&, StoredCredentials, SecurityOrigin* = 0); On 2013/07/15 17:00:25, ...
7 years, 5 months ago (2013-07-16 06:26:27 UTC) #7
abarth-chromium
https://codereview.chromium.org/18595008/diff/12001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/18595008/diff/12001/Source/core/loader/DocumentThreadableLoader.cpp#newcode109 Source/core/loader/DocumentThreadableLoader.cpp:109: updateRequestForAccessControl(*crossOriginRequest, static_cast<SecurityOrigin*>(0), m_options.allowCredentials); You shouldn't need the static_cast here.
7 years, 5 months ago (2013-07-16 06:28:20 UTC) #8
abarth-chromium
I had trouble reviewing this CL because the description didn't link to the part of ...
7 years, 5 months ago (2013-07-16 06:29:33 UTC) #9
ancilgeorge
On 2013/07/16 06:29:33, abarth wrote: > I had trouble reviewing this CL because the description ...
7 years, 5 months ago (2013-07-16 07:05:01 UTC) #10
abarth-chromium
lgtm Thanks for updating the description. The change itself looks good.
7 years, 5 months ago (2013-07-16 22:05:06 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ancilgeorge@samsung.com/18595008/19001
7 years, 5 months ago (2013-07-16 22:05:21 UTC) #12
commit-bot: I haz the power
7 years, 5 months ago (2013-07-17 01:41:44 UTC) #13
Message was sent while issue was closed.
Change committed as 154346

Powered by Google App Engine
This is Rietveld 408576698