diff --git a/fetch.bs b/fetch.bs index c4c2ff47c..47093bc87 100644 --- a/fetch.bs +++ b/fetch.bs @@ -572,7 +572,10 @@ uses the more colloquial term "header". [[HTTP]] headers. It is initially « ».
A header list is essentially a specialized multimap: an ordered list of
-key-value pairs with potentially duplicate keys.
+key-value pairs with potentially duplicate keys. Since headers other than `Set-Cookie
`
+are always combined when exposed to client-side JavaScript, implementations could choose a more
+efficient representation, as long as they also support an associated data structure for
+`Set-Cookie
` headers.
To @@ -891,12 +894,33 @@ directly. Use get, decode, and split instead.
For each name of names:
Let value be the result of getting name - from list. +
If name is `set-cookie
`, then:
+
+
Assert: value is non-null. +
Otherwise: + +
Return headers. @@ -6498,20 +6522,13 @@ interface Headers { undefined append(ByteString name, ByteString value); undefined delete(ByteString name); ByteString? get(ByteString name); + sequence<ByteString> getSetCookie(); boolean has(ByteString name); undefined set(ByteString name, ByteString value); iterable<ByteString, ByteString>; }; -
Unlike a header list, a {{Headers}} object cannot represent more than one
-`Set-Cookie
` header. In a way this is problematic as unlike all other
-headers `Set-Cookie
` headers cannot be combined, but since `Set-Cookie
`
-headers are not exposed to client-side JavaScript this is deemed an acceptable compromise.
-Implementations could choose the more efficient {{Headers}} object representation even for a
-header list, as long as they also support an associated data structure for
-`Set-Cookie
` headers.
-
A {{Headers}} object has an associated
header list (a
header list), which is initially empty. This
@@ -6556,6 +6573,9 @@ new Headers(meta2);
Returns as a string the values of all headers whose name is name, separated by a
comma and a space.
+ Returns a list of the values for all headers whose name is ` Returns whether there is a header whose name is name.
@@ -6722,6 +6742,19 @@ method steps are to append (name, value
headers . getSetCookie()
+ Set-Cookie
`.
+
headers . has(name)
The getSetCookie()
method steps are:
+
+
If this's header list does not contain
+ `Set-Cookie
`, then return « ».
+
+
Return the values of all headers in this's
+ header list whose name is a byte-case-insensitive match
+ for `Set-Cookie
`, in order.
+
The has(name)
method steps are: