[Webkit-unassigned] [Bug 251194] [fetch] Implement `Headers.prototype.getSetCookie`

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 25 22:15:35 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=251194

--- Comment #1 from Andreu Botella <abotella at igalia.com> ---
By the way, I am working on a patch to implement this method. The main thing that makes this hard in WebKit is that the Headers interface is backed by an `HTTPHeaderMap`, which already combines all headers with the same name. Any patch would therefore have to add support for multiple `Set-Cookie` header values to `HTTPHeaderMap`.

Since `HTTPHeaderMap` already splits headers into two lists, for common (interned) and uncommon headers, it seems like it could have a third list specifically for `Set-Cookie` values. The various methods of `HTTPHeaderMap` that take a header name would have to add a match for `Set-Cookie`, but since `Set-Cookie` is a common header (and assuming it stays that way), the match is a simple enum comparison.

Some questions that are not yet clear to me at this point are how this change would affect any other consumers of `HTTPHeaderMap` in WebCore. In particular, there is at least one consumer (`WebSocketHandshake::serverSetCookie`) which uses `HTTPHeaderMap` to get the `Set-Cookie` value, which currently returns a combined string that isn't perfectly recoverable. Is other code that depends on `Set-Cookie` headers getting the header values from some other API?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230126/0300f564/attachment.htm>


More information about the webkit-unassigned mailing list