Skip to content

Commit 8bc9c3c

Browse files
lutienwhimboo
andauthored
Allow "sameSite" cookie property to have value "default". (#942)
* Allow sameSite cookie property to be optional. * Change the order of the properties Co-authored-by: Henrik Skupin <[email protected]> * Skip setting "sameSite" when it's null * Update index.bs Co-authored-by: Henrik Skupin <[email protected]> * Update the wording * Allow sameSite cookie property to have value "Default" * Update references to cookie rfcs * Remove same-site spec override --------- Co-authored-by: Henrik Skupin <[email protected]>
1 parent 7831d08 commit 8bc9c3c

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

index.bs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ spec: RFC6265
4747
type: dfn
4848
text: Cookie; url: https://httpwg.org/specs/rfc6265.html
4949
text: Cookie store; url: https://httpwg.org/specs/rfc6265.html#storage-model
50-
spec: RFC6265bis; urlPrefix: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-05
50+
spec: RFC6265bis; urlPrefix: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-20.html
5151
type: dfn
5252
text: Lax; url: section-4.1.2.7
5353
text: Strict; url: section-4.1.2.7
54+
text: Default; url: section-5.6.7.2
5455
spec: WEBDRIVER; urlPrefix: https://w3c.github.io/webdriver/
5556
type: dfn
5657
text: WebDriver new session algorithm; url: dfn-webdriver-new-session-algorithms
@@ -324,17 +325,6 @@ spec: STREAMS; urlPrefix: https://streams.spec.whatwg.org/
324325
text: ReadableStream; url: #readablestream
325326
</pre>
326327

327-
<pre class="biblio">
328-
{
329-
"SAME-SITE-COOKIES": {
330-
"authors": ["Mike West", "Mark Goodwin"],
331-
"href": "https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-same-site",
332-
"publisher": "IETF",
333-
"title": "Same-Site Cookies"
334-
}
335-
}
336-
</pre>
337-
338328
<style>
339329
var {
340330
color: #cd5c5c
@@ -6845,7 +6835,7 @@ that can be added.
68456835

68466836
<pre class="cddl" data-cddl-module="local-cddl,remote-cddl">
68476837

6848-
network.SameSite = "strict" / "lax" / "none"
6838+
network.SameSite = "strict" / "lax" / "none" / "default"
68496839

68506840
<!--
68516841
Modifications to this definition should be reflected in
@@ -6859,8 +6849,8 @@ network.Cookie = {
68596849
size: js-uint,
68606850
httpOnly: bool,
68616851
secure: bool,
6862-
sameSite: network.SameSite,
68636852
? expiry: js-uint,
6853+
sameSite: network.SameSite,
68646854
Extensible,
68656855
}
68666856
</pre>
@@ -6870,9 +6860,6 @@ The <code>network.Cookie</code> type represents a cookie.
68706860
<div algorithm>
68716861
To <dfn>serialize cookie</dfn> given |stored cookie|:
68726862

6873-
Note: The definitions of |stored cookie|'s fields are from [[COOKIES]], except
6874-
samesite-flag, which is from [[SAME-SITE-COOKIES]].
6875-
68766863
1. Let |name| be the result of [=UTF-8 decode=] with |stored cookie|'s name field.
68776864

68786865
1. Let |value| be [=serialize protocol bytes=] with |stored cookie|'s value.
@@ -6893,9 +6880,10 @@ samesite-flag, which is from [[SAME-SITE-COOKIES]].
68936880
1. Let |secure| be true if |stored cookie|'s secure-only-flag is true, or false
68946881
otherwise.
68956882

6896-
1. Let |same site| be "<code>none</code>" if |stored cookie|'s samesite-flag is
6897-
"<code>None</code>", "<code>lax</code>" if it is "<code>Lax</code>", or
6898-
"<code>strict</code>" if it is "<code>Strict</code>".
6883+
1. Let |same site| be "<code>none</code>" if |stored cookie|'s same-site-flag is
6884+
"<code>None</code>", "<code>lax</code>" if it is "<code>Lax</code>",
6885+
"<code>strict</code>" if it is "<code>Strict</code>", or
6886+
"<code>default</code>" if it is "<code>Default</code>"
68996887

69006888
1. Return a map matching the <code>network.Cookie</code> production,
69016889
with the <code>name</code> field set to |name|, the <code>value</code> field

0 commit comments

Comments
 (0)