Closed
Bug 1346313
Opened 8 years ago
Closed 8 years ago
Fetch: use ", " as value separator rather than ","
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: annevk, Assigned: tt)
Details
Attachments
(3 files, 6 obsolete files)
957 bytes,
patch
|
tt
:
review+
|
Details | Diff | Splinter Review |
2.63 KB,
patch
|
tt
:
review+
|
Details | Diff | Splinter Review |
2.07 KB,
patch
|
tt
:
review+
|
Details | Diff | Splinter Review |
Somewhat related to bug 1330297. The plan is to make Fetch and XMLHttpRequest as close as possible as they can be and not to have weird small divergences.
Standard change: https://github.com/whatwg/fetch/pull/504.
Tests: https://github.com/w3c/web-platform-tests/pull/5115. (There's many other tests around this too that have already landed. I suspect that any code changes would end up affecting more results than just these.)
Updated•8 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•8 years ago
|
||
Simple fix for using ", " rather than just "," to separate combined value.
I will check the patch again to ensure I don't misunderstand anything.
Assignee | ||
Comment 3•8 years ago
|
||
Update the WPT test to verify behavior.
Assignee | ||
Comment 4•8 years ago
|
||
While implementing, I found that we don't ensure there are no any leading or trailing HTTP whitespace for Header's value [1].
To achieve this, I check HTTP whitespace on IsReasonableHeaderValue()[2]. But, it is called from lots of places, so I'm not sure whether should we apply this check to those places.
Moreover, I also not sure about whether this patch belongs to this bug.
I'll check above questions next week.
[1] https://fetch.spec.whatwg.org/#dfnReturnLink-0
[2] http://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsHttp.cpp#250-264
Assignee | ||
Comment 5•8 years ago
|
||
Comment on attachment 8855745 [details] [diff] [review]
P3: Patch for ensuring reasonalbe HTTP value.
I found that I should just strip the HTTP whitespace rather than forbid the HTTP whitespace appears. Moreover, I found there is a bug for stripping HTTP whitespace, which is bug 1330297.
Attachment #8855745 -
Attachment is obsolete: true
Assignee | ||
Comment 6•8 years ago
|
||
Assignee | ||
Comment 7•8 years ago
|
||
Add a patch to modify mochitest which is affected by the change of combined value.
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Tom Tung [:tt] from comment #6)
rerun try after applying P3.
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=351ad60bd64436d1cc4921f47ade07757a13569d
Assignee | ||
Comment 9•8 years ago
|
||
Update for the typo of bug commit message.
Attachment #8856406 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8856858 -
Attachment description: P3: Update mochitests since we change the format for combined value. 22 hours ago Tom Tung [:tt] 2.55 KB, patch → P3: Update mochitests since we change the format for combined value.
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8855741 [details] [diff] [review]
P1: Modify Fetch's header handler delimiter to 0x2C 0x20 to align with spec.
Hi Andrea,
This bug is to align the behavior for getting header's combined value. We used to used ',' to separate multiple values, and now we want to use ', ' to separate them.
github issue: https://github.com/whatwg/fetch/pull/504
This patch is the main change for it. Could you help me to review it? Thanks!
Attachment #8855741 -
Flags: review?(amarchesini)
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8855742 [details] [diff] [review]
P2: Update wpt test to verify our implementation algin with spec.
Patch for updating WPT in github issue to verify the behavior is correct.
Attachment #8855742 -
Flags: review?(amarchesini)
Assignee | ||
Comment 12•8 years ago
|
||
Comment on attachment 8856858 [details] [diff] [review]
P3: Update mochitests since we change the format for combined value.
Patch for fixing mochitest since we change the behavior of Header.
Attachment #8856858 -
Flags: review?(amarchesini)
Assignee | ||
Comment 13•8 years ago
|
||
Sorry for change patch, I just found there is a useless modification. Update the patch and send review request again... :(
Attachment #8856858 -
Attachment is obsolete: true
Attachment #8856858 -
Flags: review?(amarchesini)
Attachment #8856922 -
Flags: review?(amarchesini)
Updated•8 years ago
|
Attachment #8855741 -
Flags: review?(amarchesini) → review+
Comment 14•8 years ago
|
||
Comment on attachment 8855742 [details] [diff] [review]
P2: Update wpt test to verify our implementation algin with spec.
Review of attachment 8855742 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/web-platform/tests/fetch/api/headers/headers-combine.html
@@ -25,5 @@
> test(function() {
> var headers = new Headers(headerSeqCombine);
> for (name in expectedDict)
> - assert_equals(headers.get(name), expectedDict[name],
> - "name: " + name + " has value: " + expectedDict[name]);
why have you removed the message here?
@@ -51,5 @@
> for (name in expectedDict) {
> var value = headers.get(name);
> headers.append(name,"newSingleValue");
> - assert_equals(headers.get(name), (value + "," + "newSingleValue"),
> - "name: " + name + " has value: " + headers.get(name));
and here?
Attachment #8855742 -
Flags: review?(amarchesini) → review+
Updated•8 years ago
|
Attachment #8856922 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 15•8 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #14)
Thanks for the reviews!
> ::: testing/web-platform/tests/fetch/api/headers/headers-combine.html
> @@ -25,5 @@
> > test(function() {
> > var headers = new Headers(headerSeqCombine);
> > for (name in expectedDict)
> > - assert_equals(headers.get(name), expectedDict[name],
> > - "name: " + name + " has value: " + expectedDict[name]);
>
> why have you removed the message here?
>
> @@ -51,5 @@
> > for (name in expectedDict) {
> > var value = headers.get(name);
> > headers.append(name,"newSingleValue");
> > - assert_equals(headers.get(name), (value + "," + "newSingleValue"),
> > - "name: " + name + " has value: " + headers.get(name));
>
> and here?
I didn't have any strong reason for it. I thought it's better to have less differentiate between github and ours, so I applied the commit[2]. I wanted to align it with web-platform-tests in githud[1].
I have no much experience about this. Is there any reason that we want to keep it? If so, I will add them back. :)
[1] https://github.com/w3c/web-platform-tests/blob/master/fetch/api/headers/headers-combine.html
[2] https://github.com/w3c/web-platform-tests/commit/c7b0af2363886e40e48b024ccd03eb2b252785c2
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 16•8 years ago
|
||
Update commit message since it got r+
Attachment #8855741 -
Attachment is obsolete: true
Attachment #8857299 -
Flags: review+
Assignee | ||
Comment 17•8 years ago
|
||
Attachment #8855742 -
Attachment is obsolete: true
Attachment #8857301 -
Flags: review+
Assignee | ||
Comment 18•8 years ago
|
||
Attachment #8856922 -
Attachment is obsolete: true
Attachment #8857302 -
Flags: review+
Assignee | ||
Updated•8 years ago
|
Attachment #8857299 -
Attachment description: Bug 1346313 - Part 1: Modify Fetch's header handler delimiter to 0x2C 0x20 to align with spec. r=baku → [Final] Bug 1346313 - Part 1: Modify Fetch's header handler delimiter to 0x2C 0x20 to align with spec. r=baku
Assignee | ||
Updated•8 years ago
|
Attachment #8857302 -
Attachment description: Bug 1346313 - Part 3: Update mochitests since we change the format for combined value. r=baku → [Final] Bug 1346313 - Part 3: Update mochitests since we change the format for combined value. r=baku
Assignee | ||
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
> I have no much experience about this. Is there any reason that we want to
> keep it? If so, I will add them back. :)
I was asking because those changes were unrelated with the rest of the patch. Good to me.
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 21•8 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #20)
> > I have no much experience about this. Is there any reason that we want to
> > keep it? If so, I will add them back. :)
>
> I was asking because those changes were unrelated with the rest of the
> patch. Good to me.
Thanks! I see.
Assignee | ||
Updated•8 years ago
|
Attachment #8857301 -
Attachment description: Bug 1346313 - Part 2: Update wpt test to verify our implementation algin with spec. r=baku → [Final] Bug 1346313 - Part 2: Update wpt test to verify our implementation algin with spec. r=baku
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 22•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/68fda8a87a98
Part 1: Modify Fetch's header handler delimiter to 0x2C 0x20 to align with spec. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/825e868da1de
Part 2: Update wpt test to verify our implementation align with spec. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/3217a1c33b4c
Part 3: Update mochitests since we change the format for combined value. r=baku
Keywords: checkin-needed
Comment 23•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/68fda8a87a98
https://hg.mozilla.org/mozilla-central/rev/825e868da1de
https://hg.mozilla.org/mozilla-central/rev/3217a1c33b4c
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•