-
Notifications
You must be signed in to change notification settings - Fork 166
Description
As discussed in #1428 I thought I'd try to note down what Fetch needs:
Cookieheader 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-Cookieheaders.
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.)