-
Notifications
You must be signed in to change notification settings - Fork 340
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
The comma-delimited combined value definition does not support Set-Cookie headers #345
Comments
We don't expose |
Ah ok, thank you! |
I do think we should clarify this so I'm going to reopen. Hope you don't mind. |
I finally posted a clarification in #714. |
FWIW, Cloudflare Workers needs to break spec here, because in our environment Set-Cookie very much is accessible and intended to be accessed from JavaScript. Our plan for now is to special-case Set-Cookie in calls to |
That would still result in a broken |
@annevk Yes. It's less obvious what to do about those, so we haven't come up with anything. Looking at practical use cases, fixing |
It seems somewhat inevitable that eventually code gets complex enough that it needs inspection. I suppose when returning instead of "combined value" you could use something else that uses |
Oh hmm... @harrishancock did we misread this? It looks like append() actually doesn't specify that same-named headers should be combined. It's only on |
@kentonv This is embarrassing but I think we didn't realize we fixed it while fixing the passthrough case. D: |
Hah. Indeed, it turns out that our implementation is correct and |
See w3c/resource-timing#345 Since early hints have landed, there are additional useful timestamps that are currently not exposed: - First interim response start (e.g. when we received a 103) as a different timestamp from the final response start (e.g. when we received the 200) - Final headers received (when the last header has been received and we're ready for the body) - First bytes of the body received The naming in whatwg#345 is not finalized yet, but it's clear that these are the 3 interesting timestamps. This PR exposes those for later use by resource timing.
See w3c/resource-timing#345 Since early hints have landed, there are additional useful timestamps that are currently not exposed: - First interim response start (e.g. when we received a 103) as a different timestamp from the final response start (e.g. when we received the 200) - Final headers received (when the last header has been received and we're ready for the body) - First bytes of the body received The naming in whatwg#345 is not finalized yet, but it's clear that these are the 3 interesting timestamps. This PR exposes those for later use by resource timing.
See w3c/resource-timing#345 Since early hints have landed, there are additional useful timestamps that are currently not exposed: - First interim response start (e.g. when we received a 103) as a different timestamp from the final response start (e.g. when we received the 200) - Final headers received (when the last header has been received and we're ready for the body) - First bytes of the body received The naming in whatwg#345 is not finalized yet, but it's clear that these are the 3 interesting timestamps. This PR exposes those for later use by resource timing.
The spec says:
This properly follows the HTTP/1.1 Message Syntax and Routing Standards, which says:
However, headers with the name
Set-Cookie
are discussed as a special case:The
Set-Cookie
header field is defined here. A couple of its sub-rules, specificallypath-value
andextension-av
, allow commas as part of the elements. This means that header-field values forSet-Cookie
names should not be comma-delimited.Also to note from "HTTP State Management Mechanism" from the latter link above:
Conclusion: The Fetch spec should be updated with an exception for handling the
Set-Cookie
header name case(please double-check my interpretation, I could be wrong!)
The text was updated successfully, but these errors were encountered: