@@ -9490,6 +9490,25 @@ keys for which no default is available. As such the list must not share any
9490
9490
entries with the keys of [=default values for storage partition key
9491
9491
attributes=] .
9492
9492
9493
+ <div algorithm>
9494
+ To <dfn>deserialize filter</dfn> given |filter|:
9495
+
9496
+ 1. Let |deserialized filter| to be an empty [=/map=] .
9497
+
9498
+ 1. For each |name| → |value| in |filter|:
9499
+
9500
+ 1. Let |deserialized name| be the field name corresponding to the JSON key |name| in
9501
+ the [=table for cookie conversion=] .
9502
+
9503
+ 1. If |name| is "<code> value</code> ", set |deserialized value| to [=deserialize protocol bytes=] with |value|,
9504
+ otherwise let |deserialized value| be |value|.
9505
+
9506
+ 1. [=map/Set=] |deserialized filter|[|deserialized name|] to |deserialized value|.
9507
+
9508
+ 1. Return |deserialized filter|.
9509
+
9510
+ </div>
9511
+
9493
9512
<div algorithm>
9494
9513
To <dfn>expand a storage partition spec</dfn> given |partition spec|:
9495
9514
@@ -9545,17 +9564,7 @@ To <dfn>match cookie</dfn> given |stored cookie| and |filter|:
9545
9564
9546
9565
1. For each |name| → |value| in |filter|:
9547
9566
9548
- 1. If |name| is "<code> value</code> ":
9549
-
9550
- 1. Set |value| to [=deserialize protocol bytes=] with |value|.
9551
-
9552
- 1. Let |field name| be the field name corresponding to the JSON key |name| in
9553
- the [=table for cookie conversion=] .
9554
-
9555
- 1. If |field name| is "<code> value</code> ", set |store cookie value| to [=deserialize protocol bytes=] with |stored cookie|["value"] ,
9556
- Otherwise let |store cookie value| be |stored cookie|[|field name|] .
9557
-
9558
- 1. If |store cookie value| does not equal |value|:
9567
+ 1. If |stored cookie|[|name|] does not equal |value|:
9559
9568
9560
9569
1. Return false.
9561
9570
@@ -9568,13 +9577,13 @@ To <dfn>get matching cookies</dfn> given |cookie store| and |filter|:
9568
9577
9569
9578
1. Let |cookies| be a new list.
9570
9579
9571
- 1. For each |stored cookie| in |cookie store|:
9580
+ 1. Set |deserialized filter| to [=deserialize filter=] with |filter|.
9572
9581
9573
- 1. Let |serialized cookie| be the result of [=serialize cookie=] given |stored cookie|.
9582
+ 1. For each |stored cookie| in | cookie store|:
9574
9583
9575
- 1. If [=match cookie=] with |serialized cookie| and |filter| is true:
9584
+ 1. If [=match cookie=] with |stored cookie| and |deserialized filter| is true:
9576
9585
9577
- 1. Append |serialized cookie| to |cookies|.
9586
+ 1. Append |stored cookie| to |cookies|.
9578
9587
9579
9588
1. Return |cookies|.
9580
9589
@@ -9662,8 +9671,16 @@ The [=remote end steps=] with <var ignore>session</var> and |command parameters|
9662
9671
9663
9672
1. Let |cookies| be the result of [=get matching cookies=] with |store| and |filter|.
9664
9673
9674
+ 1. Let |serialized cookies| be a new list.
9675
+
9676
+ 1. For each |cookie| in |cookies|:
9677
+
9678
+ 1. Let |serialized cookie| be the result of [=serialize cookie=] given |cookie|.
9679
+
9680
+ 1. Append |serialized cookie| to |serialized cookies|.
9681
+
9665
9682
1. Let |body| be a [=/map=] matching the <code> storage.GetCookiesResult</code> production,
9666
- with the <code> cookies</code> field set to |cookies| and the <code> partitionKey</code>
9683
+ with the <code> cookies</code> field set to |serialized cookies| and the <code> partitionKey</code>
9667
9684
field set to |partition key|.
9668
9685
9669
9686
1. Return [=success=] with data |body|.
0 commit comments