Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie 5.5 empty cookie name #1081

Closed
essen opened this issue Feb 29, 2020 · 0 comments · Fixed by #1144
Closed

Cookie 5.5 empty cookie name #1081

essen opened this issue Feb 29, 2020 · 0 comments · Fixed by #1144
Assignees
Labels

Comments

@essen
Copy link
Contributor

essen commented Feb 29, 2020

Step 4 says:

Serialize the cookie-list into a cookie-string by processing each cookie in the cookie-list in order:
1. Output the cookie’s name, the %x3D (“=”) character, and the cookie’s value.
2. If there is an unprocessed cookie in the cookie-list, output the characters %x3B and %x20 (“; “).

However looking at WPT tests (for example [1] / [2]) I can see that when we have Set-Cookie: foo (empty name with value foo) the expectation is to have Cookie: foo back, so perhaps these instructions should include a special case when the cookie name is empty.

[1] https://github.com/web-platform-tests/wpt/blob/master/cookies/http-state/resources/test-files/0004-test
[2] https://github.com/web-platform-tests/wpt/blob/master/cookies/http-state/resources/test-files/0004-expected

@mnot mnot added the 6265bis label Mar 17, 2020
mikewest added a commit that referenced this issue Mar 31, 2020
Nameless cookies serialize as `value`. Valueless cookies serialize as
`name=`. No, this isn't what we would have chosen if we were designing
cookies from scratch, but it's Chromium and Firefox's shipping behavior,
and it's reasonable to just accept.

This specification change is covered by 0021 and 0022 in the WPT
repository (see
https://wpt.fyi/results/cookies/http-state/general-tests.html?label=master&label=experimental&aligned).

Closes #1081.
@mikewest mikewest self-assigned this Mar 31, 2020
mikewest added a commit that referenced this issue Apr 1, 2020
Nameless cookies serialize as `value`. Valueless cookies serialize as
`name=`. No, this isn't what we would have chosen if we were designing
cookies from scratch, but it's Chromium and Firefox's shipping behavior,
and it's reasonable to just accept.

This specification change is covered by 0021 and 0022 in the WPT
repository (see
https://wpt.fyi/results/cookies/http-state/general-tests.html?label=master&label=experimental&aligned).

Closes #1081.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants