Perfect-HTTPServer icon indicating copy to clipboard operation
Perfect-HTTPServer copied to clipboard

Not possible to enumerate multiple instances of a HTTPResponse header.

Open ghost opened this issue 7 years ago • 0 comments

When a HTTPResponse contains multiple headers, it is not possible to write a response filter that re-writes those headers, as HTTPResponse.header(_ named: HTTPResponseHeader.Name) -> String? only exposes the first instance of the header.

This is a problem for example when one wants to re-write cookies in a response filter, as there could be multiple Set-Cookie headers in the response.

Likewise, it is not possible to delete a header in a response filter.

ghost avatar Dec 26 '18 14:12 ghost