nathschmidt/restify-cookies

Unable to set multiple cookies with `response.setCookie`

Closed this issue · 2 comments

I'm trying to set multiple cookies with res.setCookie but only the most recent cookie is being retained.

Quick example:

endpoint(req, res, next) {
  res.setCookie('test', 'test');
  res.setCookie('test2', 'test2'); // This is the only data in `Set-Cookie` header
  res.send(200);
}

Prior to v0.2.4 I was seeing both test and test2 in the Set-Cookie header.

Yeah, this is a regression added by a recent "fix" for a minor spec violation in 7.1.0.

For now pinning to v0.2.3 will work for version 4, 6, and 7. Working on a fix now.

Fixed on master, new version (v0.2.5) is rolling out now. Many thanks to @antonioguerra for the fix.