jrf0110 / 8track

A service worker router with async middleware and neato type-inference inspired by Koa
56 stars 6 forks source link

fix: Set-Cookie header issue #66

Closed M-Krilano closed 2 years ago

M-Krilano commented 2 years ago

This will allow multiple cookies to be set from the server by adding multiple 'Set-Cookie' fields within the header response.

Before this fix, if there was multiple 'Set-Cookie' fields, it would be merged into one string value and this is not allowed according to rfc6265 standard

Before Fix:

// Response Header
Set-Cookie: "cookie1=1 cookie2=2"

After Fix:

// Response Header
Set-Cookie: "cookie1=1"
Set-Cookie: "cookie2=2"