-
Notifications
You must be signed in to change notification settings - Fork 335
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
Implement headers.getSetCookie() #321
Conversation
/cc @lucacasonato |
The linked Fetch spec PR appears to also require us to change Specifically, the linked PR redefines the "sort and combine" operation to produce a list like (in JSON-ish pseudocode) The "sort and combine" operation is used in exactly one place: to produce the "value pairs to iterate over". Thus, the "value pairs to iterate over" are a list of header names and values, with potentially-duplicate names. In Web IDL, all four iteration methods (
I would err on the side of yes, though I don't have a particularly compelling problem scenario. |
@lucacasonato ... can you confirm if this is intentional? It seems odd that the |
Mh, this is an interesting case. Can you comment on the spec PR? |
5fd2659
to
e034a2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; remember to squash.
Just waiting on the spec change to land upstream before landing. |
42d1f43
to
1fa1ddd
Compare
@harrishancock ... updated to add the compat flag, which meant also having to update the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, though I agree with Kenton that we could probably just delegate from getAll()
to getSetCookie()
.
3bc4fe7
to
7b7fd2e
Compare
Updated to delegate getAll to getSetCookie, also squashed and rebased for a final CI run. |
Implementation of the proposed
headers.getSetCookie()
APIThe API is still not 100% finished so we likely don't want to land just yet. Deno folks have asked (through wintercg) if we could coordinate on the release of this so that it hits multiple runtimes at the same time, allowing us to get a bit more of a bang-for-the-buck announcing the common API.The spec change has landed, this should be just about ready to go.Note: this is potentially a breaking change due to the change in the way the iterator is handled. Previously, our iterator would inappropriate mungeAdded a compatibility flagset-cookie
headers together. This change separates them properly for bothentries()
andvalues()
. Do we need a compatibility flag tor this behavior change?Refs: whatwg/fetch#1346