-
Notifications
You must be signed in to change notification settings - Fork 164
Description
As discussed in #1428 I thought I'd try to note down what Fetch needs:
Cookie
header is appended in https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch.- Currently https://fetch.spec.whatwg.org/#http-network-fetch parses
Set-Cookie
headers.
Neither is super precise, especially when it comes to the various cookie policies implementations have, the cookie store, and any potential partitioning of that cookie store.
Furthermore, with SameSite
I feel like we have a layering violation where the cookie specification makes determinations about cookies that it really needs additional input from Fetch from (i.e., more than a URL). I think it's understandable how that became to be that way, but I think eventually it would be better if that was better abstracted and "site for cookies" and such are instead inputs from Fetch. (Either calculated in fetch before it does things on a thread where that information is no longer accessible or even before fetch is invoked as not all invocations happen from the "main thread".)
None of this seems particularly pressing to me, but I think we should get to it eventually.
(See also whatwg/fetch#693.)