http2: cookies
sebdeckers opened this issue · 5 comments
sebdeckers commented
The set-cookie
header may appear multiple times. Its values should be handled as an Array in all response header methods.
jasnell commented
well... same area. at least :-) .. the mapToHeaders function was not handling multi-valued headers appropriately. This should fix that.
sebdeckers commented
@jasnell Hah, awesome!
If the HTTP/2 API supports duplicate headers for any header, the compatibility layer may need to mimic the old behaviour described in message.headers
:
Duplicates in raw headers are handled in the following ways, depending on the header name:
- Duplicates of age, authorization, content-length, content-type, etag, expires, from, host, if-modified-since, if-unmodified-since, last-modified, location, max-forwards, proxy-authorization, referer, retry-after, or user-agent are discarded.
- set-cookie is always an array. Duplicates are added to the array.
- For all other headers, the values are joined together with ', '.
jasnell commented
yeah, for the first point, we may need to enforce that at a lower level... not just in the compat layer.
sebdeckers commented