From 756f17ce228d0c34d9f30d93e42d347e83612db3 Mon Sep 17 00:00:00 2001 From: Steven Bingler Date: Wed, 27 Jul 2022 04:00:49 -0400 Subject: [PATCH] RFC6265bis: Offload Service Worker SFC computation to spec (#2217) * Offload Service Worker SFC computation to spe This changes how 6265bis computes the Site for Cookies for Service Workers by referring to their spec instead of spelling it out locally. * Add to change log * Offload Service Worker SFC computation to spe This changes how 6265bis computes the Site for Cookies for Service Workers by referring to their spec instead of spelling it out locally. * Add to change log --- draft-ietf-httpbis-rfc6265bis.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/draft-ietf-httpbis-rfc6265bis.md b/draft-ietf-httpbis-rfc6265bis.md index 291a5c4bd..1737bf119 100644 --- a/draft-ietf-httpbis-rfc6265bis.md +++ b/draft-ietf-httpbis-rfc6265bis.md @@ -1088,20 +1088,8 @@ Service Workers are more complicated, as they act as a completely separate execution context with only tangential relationship to the Document which registered them. -Requests which simply pass through a Service Worker will be handled as described -above: the request's client will be the Document or Worker which initiated the -request, and its "site for cookies" will be those defined in -{{document-requests}} and {{dedicated-and-shared-requests}} - -Requests which are initiated by the Service Worker itself (via a direct call to -`fetch()`, for instance), on the other hand, will have a client which is a -ServiceWorkerGlobalScope. Its "site for cookies" will be the Service Worker's -URI's origin. - -Given a ServiceWorkerGlobalScope (`worker`), the following algorithm returns its -"site for cookies": - -1. Return `worker`'s origin. +How user agents handle Service Workers may differ, but user agents SHOULD +match the {{SERVICE-WORKERS}} specification. ## Ignoring Set-Cookie Header Fields {#ignoring-cookies} @@ -2519,6 +2507,9 @@ The "Cookie Attribute Registry" should be created with the registrations below: * Add warning to not send nameless cookies: +* Add note regarding Service Worker's computation of "site for cookies": + + # Acknowledgements {:numbered="false"} RFC 6265 was written by Adam Barth. This document is an update of RFC 6265,