Skip to content

Commit 0b7268f

Browse files
jugglinmikesadym-chromium
authored andcommitted
Rename field in cookie representation (#596)
* Normative: rename field in cookie representation WebDriver Classic uses "expiry" as the "JSON key" to represent the RFC 6265 field called "expiry-time" [^1]. Rename the field in WebDriver BiDi's corresponding types to promote coherence and facilitate additional normative references to that specification. [^1]: https://w3c.github.io/webdriver/#dfn-table-for-cookie-conversion * Editorial: correct reference to RFC 6265 field The RFC uses the name "expires" for the attribute in the Set-Cookie header--not the field of the cookie within the storage model.
1 parent 1962f6b commit 0b7268f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

index.bs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4387,7 +4387,7 @@ network.Cookie = {
43874387
httpOnly: bool,
43884388
secure: bool,
43894389
sameSite: "strict" / "lax" / "none",
4390-
? expires: js-uint,
4390+
? expiry: js-uint,
43914391
};
43924392
</pre>
43934393

@@ -4407,7 +4407,7 @@ samesite-flag, which is from [[SAME-SITE-COOKIES]].
44074407

44084408
1. Let |path| be |stored cookie|'s path field.
44094409

4410-
1. Let |expires| be |stored cookie|'s expires field represented as a unix
4410+
1. Let |expiry| be |stored cookie|'s expiry-time field represented as a unix
44114411
timestamp, if set, or null otherwise.
44124412

44134413
1. Let |size| be the byte length of the result of serializing |stored cookie|
@@ -4426,8 +4426,8 @@ samesite-flag, which is from [[SAME-SITE-COOKIES]].
44264426
1. Return a map matching the <code>network.Cookie</code> production,
44274427
with the <code>name</code> field set to |name|, the <code>value</code> field
44284428
set to |value|, the <code>domain</code> field set to |domain|, the
4429-
<code>path</code> field set to |path|, the <code>expires</code> field set to
4430-
|expires| if it's not null, or omitted otherwise, the <code>size</code> field
4429+
<code>path</code> field set to |path|, the <code>expiry</code> field set to
4430+
|expiry| if it's not null, or omitted otherwise, the <code>size</code> field
44314431
set to |size|, the <code>httpOnly</code> field set to |http only|, the
44324432
<code>secure</code> field set to |secure|, and the <code>sameSite</code>
44334433
field set to |same site|.
@@ -4902,7 +4902,7 @@ network.SetCookieHeader = {
49024902
value: network.BytesValue,
49034903
? domain: text,
49044904
? httpOnly: bool,
4905-
? expires: text,
4905+
? expiry: text,
49064906
? maxAge: js-int,
49074907
? path: text,
49084908
? sameSite: "strict" / "lax" / "none",
@@ -4959,11 +4959,11 @@ To <dfn>serialize set-cookie header</dfn> given |protocol cookie|:
49594959
1. Let |header value| be the [=byte sequence=] formed by concatenating |name|,
49604960
`<code>=</code>`, and |value|.
49614961

4962-
1. If |protocol cookie| [=map/contains=] "<code>expires</code>:
4962+
1. If |protocol cookie| [=map/contains=] "<code>expiry</code>:
49634963

49644964
1. Let |attribute| be `<code>;Expires=</code>`
49654965

4966-
1. Append [=UTF-8 encode=] |protocol cookie|["<code>expires</code>"] to
4966+
1. Append [=UTF-8 encode=] |protocol cookie|["<code>expiry</code>"] to
49674967
|attribute|.
49684968

49694969
1. Append |attribute| to |header value|.

0 commit comments

Comments
 (0)