[whatwg/fetch] Integrate with new draft cookie spec (draft-annevk-johannhof-httpbis-cookies/00++) (PR #1807)

This adds algorithms to retrieve and store cookies via the [new draft cookie spec](https://datatracker.ietf.org/doc/draft-annevk-johannhof-httpbis-cookies/00/), assuming we have some more partitioning arguments.

It is based on #1707, and in total it does the following:
- lift samesite logic from 6265bis
- append cookies to requests
- pull cookies from responses
- define partition keys for fetches
- define when unpartitioned cookies cannot be used

This blocks on some HTML changes

This patch does the following on top of the work in #1707:
- rebase to main
- add logic for parsing and storing cookies
- point to the IETF-hosted draft cookie spec
- don't point to storage access API for has storage access, use a broken link instead
- add a broken link to environment/ancestry
- add a broken link for the request's initiator origin plumbed in from HTML. It'll be defined here, but we need to modify HTML so we can track it in the top.
- add broken links to things that need to be added to HTML
- fix some nits (e.g. "foo" -> "<code>foo</code>")
- use [=secure context=] not scheme=https
- use SameSite=None by default. Let's punt on that for now, given the current state of implementations and lack of clear path forward.

- [x] At least two implementers are interested (and none opposed):
   * Mozilla
   * Apple
   * Google
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * This shouldn't change functionality.
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: n/a
   * Gecko: n/a
   * WebKit: n/a
- [x] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: n/a
- [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/fetch/1807.html" title="Last updated on Jan 30, 2025, 1:58 PM UTC (5971b14)">Preview</a> | <a href="https://whatpr.org/fetch/1807/07662d3...5971b14.html" title="Last updated on Jan 30, 2025, 1:58 PM UTC (5971b14)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/1807

-- Commit Summary --

  * Pick up, dust off, and improve cookie layering

-- File Changes --

    M fetch.bs (177)

-- Patch Links --

https://github.com/whatwg/fetch/pull/1807.patch
https://github.com/whatwg/fetch/pull/1807.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1807
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1807@github.com>

Received on Thursday, 30 January 2025 13:58:56 UTC