Description was changed from ========== Leave out empty-valued Access-Control-Request-Headers: on preflights. Following https://github.com/whatwg/fetch/issues/459 , the ...
3 years, 11 months ago
(2017-01-17 21:56:24 UTC)
#5
Description was changed from
==========
Leave out empty-valued Access-Control-Request-Headers: on preflights.
Following https://github.com/whatwg/fetch/issues/459 , the above
header should not be included if the request has no headers to enumerate.
R=
BUG=633729
==========
to
==========
Leave out empty-valued Access-Control-Request-Headers: on preflights.
Following https://github.com/whatwg/fetch/issues/459 , the above
preflight header should not be included if the request following CORS
has no headers to enumerate.
R=
BUG=633729
==========
3 years, 11 months ago
(2017-01-17 23:46:27 UTC)
#9
Dry run: This issue passed the CQ dry run.
yhirano
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp File third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp (right): https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp#newcode111 third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp:111: if (request.httpHeaderFields().size()) { Do we need this outer branch? ...
3 years, 11 months ago
(2017-01-18 05:41:55 UTC)
#10
Thank you for fixing this. https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js (right): https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js#newcode177 third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js:177: [checkMethod]], This test is ...
3 years, 11 months ago
(2017-01-18 06:00:29 UTC)
#11
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js (right): https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js#newcode177 third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js:177: [checkMethod]], On 2017/01/18 06:26:49, sof wrote: > On 2017/01/18 ...
3 years, 11 months ago
(2017-01-18 06:49:02 UTC)
#13
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js
(right):
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js:177:
[checkMethod]],
On 2017/01/18 06:26:49, sof wrote:
> On 2017/01/18 06:00:29, tyoshino wrote:
> > This test is ok to have, but what we should test is a request with a custom
> but
> > simple header, I think. Could you please add it (needs change on
> > getRequestInit() in thorough-util.js)?
>
> You mean explicitly furnishing the request with a significant subset of
> https://fetch.spec.whatwg.org/#cors-safelisted-request-header ?
Right. Even before this fix, we skipped the Access-Control-Request-Headers
header generation when there's no header in the ResourceRequest given to the
DocumentThreadableLoader. The problem is when there's any CORS-safelisted header
in the ResourceRequest, the Access-Control-Request-Headers header generation
code is run, and because of my patch, it skips CORS-safelisted headers to
generate an empty header. I think it's worth adding this scenario as a unit
test.
sof
The CQ bit was checked by sigbjornf@opera.com to run a CQ dry run
3 years, 11 months ago
(2017-01-18 06:57:42 UTC)
#14
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js (right): https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js#newcode177 third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js:177: [checkMethod]], On 2017/01/18 06:49:02, tyoshino wrote: > On 2017/01/18 ...
3 years, 11 months ago
(2017-01-18 06:57:48 UTC)
#15
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js
(right):
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/cors-preflight2.js:177:
[checkMethod]],
On 2017/01/18 06:49:02, tyoshino wrote:
> On 2017/01/18 06:26:49, sof wrote:
> > On 2017/01/18 06:00:29, tyoshino wrote:
> > > This test is ok to have, but what we should test is a request with a
custom
> > but
> > > simple header, I think. Could you please add it (needs change on
> > > getRequestInit() in thorough-util.js)?
> >
> > You mean explicitly furnishing the request with a significant subset of
> > https://fetch.spec.whatwg.org/#cors-safelisted-request-header ?
>
> Right. Even before this fix, we skipped the Access-Control-Request-Headers
> header generation when there's no header in the ResourceRequest given to the
> DocumentThreadableLoader. The problem is when there's any CORS-safelisted
header
> in the ResourceRequest, the Access-Control-Request-Headers header generation
> code is run, and because of my patch, it skips CORS-safelisted headers to
> generate an empty header. I think it's worth adding this scenario as a unit
> test.
ok, that code path was already being exercised by this test - i suspect some
default "CORS safelisted" headers were making it through already, but didn't
investigate which. Might as well be explicit and furnish them.
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp (right):
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp:111: if
(request.httpHeaderFields().size()) {
On 2017/01/18 05:41:55, yhirano wrote:
> Do we need this outer branch?
It almost always holds, i reckon & the extra code it executes isn't worth losing
sleep over, so removed.
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/fetch/CrossOriginAccessControlTest.cpp
(right):
https://codereview.chromium.org/2633423003/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/fetch/CrossOriginAccessControlTest.cpp:51:
EXPECT_EQ(nullptr,
On 2017/01/18 05:41:55, yhirano wrote:
> nullAtom or AtomicString() might be easier to understand.
Using nullAtom instead + added a comment.
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2633423003/40001
3 years, 11 months ago
(2017-01-18 06:58:01 UTC)
#16
3 years, 11 months ago
(2017-01-18 07:20:55 UTC)
#17
lgtm
yhirano
lgtm
3 years, 11 months ago
(2017-01-18 07:23:08 UTC)
#18
lgtm
sof
Description was changed from ========== Leave out empty-valued Access-Control-Request-Headers: on preflights. Following https://github.com/whatwg/fetch/issues/459 , the ...
3 years, 11 months ago
(2017-01-18 07:39:16 UTC)
#19
Description was changed from
==========
Leave out empty-valued Access-Control-Request-Headers: on preflights.
Following https://github.com/whatwg/fetch/issues/459 , the above
preflight header should not be included if the request following CORS
has no headers to enumerate.
R=
BUG=633729
==========
to
==========
Leave out empty-valued Access-Control-Request-Headers: on preflights.
Following https://github.com/whatwg/fetch/issues/459 , the above
preflight header should not be included if the request following CORS
has no headers to enumerate in a preflight.
R=tyoshino,yhirano
BUG=633729
==========
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
3 years, 11 months ago
(2017-01-18 08:22:18 UTC)
#20
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484727964834740, "parent_rev": "2a525f9d4ab7f144b179ed013482e3ec98dfd6d0", "commit_rev": "cf55a356c36b96ce9ee4bd6aa33235c87412a3aa"}
3 years, 11 months ago
(2017-01-18 08:30:02 UTC)
#24
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484727964834740,
"parent_rev": "2a525f9d4ab7f144b179ed013482e3ec98dfd6d0", "commit_rev":
"cf55a356c36b96ce9ee4bd6aa33235c87412a3aa"}
commit-bot: I haz the power
Description was changed from ========== Leave out empty-valued Access-Control-Request-Headers: on preflights. Following https://github.com/whatwg/fetch/issues/459 , the ...
3 years, 11 months ago
(2017-01-18 08:30:32 UTC)
#25
Message was sent while issue was closed.
Description was changed from
==========
Leave out empty-valued Access-Control-Request-Headers: on preflights.
Following https://github.com/whatwg/fetch/issues/459 , the above
preflight header should not be included if the request following CORS
has no headers to enumerate in a preflight.
R=tyoshino,yhirano
BUG=633729
==========
to
==========
Leave out empty-valued Access-Control-Request-Headers: on preflights.
Following https://github.com/whatwg/fetch/issues/459 , the above
preflight header should not be included if the request following CORS
has no headers to enumerate in a preflight.
R=tyoshino,yhirano
BUG=633729
Review-Url: https://codereview.chromium.org/2633423003
Cr-Commit-Position: refs/heads/master@{#444303}
Committed:
https://chromium.googlesource.com/chromium/src/+/cf55a356c36b96ce9ee4bd6aa332...
==========
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/cf55a356c36b96ce9ee4bd6aa33235c87412a3aa
3 years, 11 months ago
(2017-01-18 08:30:33 UTC)
#26
Issue 2633423003: Leave out empty-valued Access-Control-Request-Headers: on preflights.
(Closed)
Created 3 years, 11 months ago by sof
Modified 3 years, 11 months ago
Reviewers: tyoshino (SeeGerritForStatus), yhirano
Base URL:
Comments: 8