UNPKG

@worker-tools/middleware

Version:

A suite of standalone HTTP server middlewares for Worker Runtimes.

13 lines (12 loc) 675 B
/** * Fixes the iteration of the `Headers` class with respect to `set-cookie` header: * * By default, multiple `set-cookie` headers will be concatenated by the `Headers` class implementation. * However, the HTTP protocol/browsers expect multiple `Set-Cookie` headers, * and do not recognize concatenated `Set-Cookie` headers. * * This helper function fixes this behavior, yielding multiple `set-cookie` key-value tuples, * provided that no cookie value contains the concatenation sequence `', '` (comma empty-space). */ export declare function iterHeadersSetCookieFix(headers: Headers): [string, string][]; export { iterHeadersSetCookieFix as headersSetCookieFix };