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

Issue 2587463002: [Fetch API] Appending headers of the same name should have their values (Closed)

Created:
4 years ago by dhna
Modified:
4 years ago
Reviewers:
jsbell, yhirano
CC:
chromium-reviews, blink-reviews, haraken
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Appending headers of the same name should have their values joined by ','. Now, FetchHeaderList::get() is iterating all header list and append strings to a result joined by ','. BUG=645497 Committed: https://crrev.com/7ad32cbf574e3d263b64f1888520b9158798d41b Cr-Commit-Position: refs/heads/master@{#439743}

Patch Set 1 #

Total comments: 9

Patch Set 2 : add unit test. #

Patch Set 3 : fix for error case. change test #

Patch Set 4 : it will be nicer. #

Total comments: 2

Patch Set 5 : minor fix #

Patch Set 6 : fix #

Patch Set 7 : add flag #

Patch Set 8 : add test #

Patch Set 9 : fix comment for changed implementation. #

Total comments: 3

Patch Set 10 : minor fix #

Patch Set 11 : fix #

Patch Set 12 : fix #

Patch Set 13 : flag to found #

Total comments: 2

Patch Set 14 : Comment fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -10 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +15 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Headers.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 44 (13 generated)
dhna
jsbell@ yhirano@ PTAL
4 years ago (2016-12-16 17:36:13 UTC) #4
jsbell
looks correct, but a handful of suggestions... https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js (right): https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js#newcode40 third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/headers.js:40: // 'set()' ...
4 years ago (2016-12-16 17:58:26 UTC) #5
dhna
https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode91 third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:91: for (auto&& header : m_headerList) { On 2016/12/16 17:58:26, ...
4 years ago (2016-12-16 18:33:35 UTC) #6
dhna
On 2016/12/16 18:33:35, dhna wrote: > https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp > File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): > > https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode91 > ...
4 years ago (2016-12-16 18:38:00 UTC) #7
jsbell
https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode93 third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:93: if (result.isEmpty()) { On 2016/12/16 18:33:35, dhna wrote: > ...
4 years ago (2016-12-16 18:55:59 UTC) #8
jsbell
sorry for the possible confusion... https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode93 third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:93: if (result.isEmpty()) { > ...
4 years ago (2016-12-16 18:57:33 UTC) #9
dhna
On 2016/12/16 18:57:33, jsbell wrote: > sorry for the possible confusion... > > https://codereview.chromium.org/2587463002/diff/1/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp > ...
4 years ago (2016-12-16 21:35:48 UTC) #10
dhna
On 2016/12/16 21:35:48, dhna wrote: > On 2016/12/16 18:57:33, jsbell wrote: > > sorry for ...
4 years ago (2016-12-16 22:00:18 UTC) #11
dhna
On 2016/12/16 22:00:18, dhna wrote: > On 2016/12/16 21:35:48, dhna wrote: > > On 2016/12/16 ...
4 years ago (2016-12-16 22:06:18 UTC) #12
dhna
On 2016/12/16 22:06:18, dhna wrote: > On 2016/12/16 22:00:18, dhna wrote: > > On 2016/12/16 ...
4 years ago (2016-12-16 22:17:52 UTC) #13
jsbell
On further reading, either the spec's definition of value or our definition is wrong. Spec ...
4 years ago (2016-12-16 22:29:37 UTC) #14
jsbell
Ah, the spec is known to be wrong here: https://github.com/whatwg/fetch/issues/332
4 years ago (2016-12-16 22:31:16 UTC) #15
jsbell
So empty values *should* be allowed and thus getting "a,,b" out is expected. Sorry for ...
4 years ago (2016-12-16 22:34:18 UTC) #16
dhna
On 2016/12/16 22:34:18, jsbell wrote: > So empty values *should* be allowed and thus getting ...
4 years ago (2016-12-16 22:58:31 UTC) #17
jsbell
Thank you for sticking with this! https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode93 third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:93: if (result.isEmpty()) { ...
4 years ago (2016-12-16 23:45:46 UTC) #18
jsbell
One more thing - can you add a test case where there are two values ...
4 years ago (2016-12-16 23:46:40 UTC) #19
dhna
https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode102 third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp:102: return !result.isEmpty(); On 2016/12/16 23:45:46, jsbell wrote: > Won't ...
4 years ago (2016-12-16 23:57:44 UTC) #20
dhna
On 2016/12/16 23:57:44, dhna wrote: > https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp > File third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp (right): > > https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp#newcode102 > ...
4 years ago (2016-12-17 00:09:54 UTC) #21
dhna
On 2016/12/17 00:09:54, dhna wrote: > On 2016/12/16 23:57:44, dhna wrote: > > > https://codereview.chromium.org/2587463002/diff/100002/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp ...
4 years ago (2016-12-17 00:22:25 UTC) #22
dhna
On 2016/12/17 00:22:25, dhna wrote: > On 2016/12/17 00:09:54, dhna wrote: > > On 2016/12/16 ...
4 years ago (2016-12-17 05:03:18 UTC) #23
dhna
On 2016/12/17 05:03:18, dhna wrote: > On 2016/12/17 00:22:25, dhna wrote: > > On 2016/12/17 ...
4 years ago (2016-12-17 14:41:45 UTC) #24
yhirano
https://codereview.chromium.org/2587463002/diff/230001/third_party/WebKit/Source/modules/fetch/Headers.cpp File third_party/WebKit/Source/modules/fetch/Headers.cpp (right): https://codereview.chromium.org/2587463002/diff/230001/third_party/WebKit/Source/modules/fetch/Headers.cpp#newcode180 third_party/WebKit/Source/modules/fetch/Headers.cpp:180: // "2. If there is no header in header ...
4 years ago (2016-12-19 11:43:05 UTC) #25
dhna
On 2016/12/19 11:43:05, yhirano wrote: > https://codereview.chromium.org/2587463002/diff/230001/third_party/WebKit/Source/modules/fetch/Headers.cpp > File third_party/WebKit/Source/modules/fetch/Headers.cpp (right): > > https://codereview.chromium.org/2587463002/diff/230001/third_party/WebKit/Source/modules/fetch/Headers.cpp#newcode180 > ...
4 years ago (2016-12-19 14:15:56 UTC) #26
jsbell
lgtm - thanks for your patience with the reviews!
4 years ago (2016-12-19 17:27:14 UTC) #27
dhna
On 2016/12/19 17:27:14, jsbell wrote: > lgtm - thanks for your patience with the reviews! ...
4 years ago (2016-12-19 19:08:58 UTC) #28
dhna
On 2016/12/19 19:08:58, dhna wrote: > On 2016/12/19 17:27:14, jsbell wrote: > > lgtm - ...
4 years ago (2016-12-19 23:18:09 UTC) #33
yhirano
lgtm
4 years ago (2016-12-20 06:37:21 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2587463002/250001
4 years ago (2016-12-20 06:55:15 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2587463002/250001
4 years ago (2016-12-20 07:32:37 UTC) #39
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years ago (2016-12-20 07:56:18 UTC) #42
commit-bot: I haz the power
4 years ago (2016-12-20 08:00:38 UTC) #44
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/7ad32cbf574e3d263b64f1888520b9158798d41b
Cr-Commit-Position: refs/heads/master@{#439743}

Powered by Google App Engine
This is Rietveld 408576698