You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also correct the algorithm as it incorrectly assumed that path could be null when in fact it's always a string.
Tests: web-platform-tests/wpt#54264.
Closes#242.
Copy file name to clipboardExpand all lines: index.bs
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1095,13 +1095,12 @@ run the following steps:
1095
1095
1. If the [=byte sequence=][=byte sequence/length=] of |encodedDomain| is greater than the [=cookie/maximum attribute value size=], then return failure.
1096
1096
1. [=list/Append=] \``Domain`\`/|encodedDomain| to |attributes|.
1097
1097
1. If |expires| is given, then [=list/append=] \``Expires`\`/|expires| ([=date serialized=]) to |attributes|.
1098
-
1. If |path| is not null:
1099
-
1. If |path| does not start with U+002F (/), then return failure.
1100
-
1. If |path| is not U+002F (/), and |name|, [=byte-lowercased=], [=byte sequence/starts with=] \``__host-`\`, then return failure.
1101
-
1. Let |encodedPath| be the result of [=UTF-8 encode|UTF-8 encoding=] |path|.
1102
-
1. If the [=byte sequence=][=byte sequence/length=] of |encodedPath| is greater than the [=cookie/maximum attribute value size=], then return failure.
1103
-
1. [=list/Append=] \``Path`\`/|encodedPath| to |attributes|.
1104
-
1. Otherwise, [=list/append=] \``Path`\`/ U+002F (/) to |attributes|.
1098
+
1. If |path| is the empty string, then set |path| to the [=/serialized cookie default path=] of |url|.
1099
+
1. If |path| does not start with U+002F (/), then return failure.
1100
+
1. If |path| is not U+002F (/), and |name|, [=byte-lowercased=], [=byte sequence/starts with=] \``__host-`\`, then return failure.
1101
+
1. Let |encodedPath| be the result of [=UTF-8 encode|UTF-8 encoding=] |path|.
1102
+
1. If the [=byte sequence=][=byte sequence/length=] of |encodedPath| is greater than the [=cookie/maximum attribute value size=], then return failure.
1103
+
1. [=list/Append=] \``Path`\`/|encodedPath| to |attributes|.
1105
1104
1. [=list/Append=] \``Secure`\`/\`\` to |attributes|.
0 commit comments