Skip to content

Commit 524d0e5

Browse files
authoredJun 12, 2024··
Merge pull request #348 from jeremyroman/duplicate-cookies
draft-nottingham-http-availability-hints: Handle duplicate cookies in Cookie-Indices.

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎draft-nottingham-http-availability-hints.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ The selection algorithm for Cookie-Indices, given a set of stored_responses a pr
190190
0. Let available_responses be an empty set.
191191
1. For each stored_response in stored_responses:
192192
1. For each cookie_index in Cookie-Indices:
193-
1. Let presented_value be the value of the cookie with the name cookie_index in presented_request. If a cookie with the name cookie_index is not present in presented_request, let presented_value be a null value.
194-
2. Let stored_value be the value of the cookie with the name cookie_index in stored_response. If a cookie with the name cookie_index is not present in stored_response, let stored_value be a null value.
195-
3. If presented_value does not equal stored_value, continue to the next stored_response.
193+
1. Let presented_values be a list of the values of the cookies with the name cookie_index in presented_request, lexicographically sorted. If no cookie with the name cookie_index is present in presented_request, let presented_values be an empty list.
194+
2. Let stored_values be a list of the values of the cookies with the name cookie_index in stored_response, lexicographically sorted. If no cookie with the name cookie_index is present in stored_response, let stored_values be an empty list.
195+
3. If presented_values does not equal stored_values, continue to the next stored_response.
196196
2. Add stored_response to available_responses.
197197
2. Return available_responses.
198198

0 commit comments

Comments
 (0)
Please sign in to comment.