cookie-node icon indicating copy to clipboard operation
cookie-node copied to clipboard

Multuple cookies do not supported

Open sparfenyuk opened this issue 15 years ago • 2 comments

If you want to set multiple cookies you will see that this is impossible. The problem is described in this post http://caolanmcmahon.com/multiple_set_cookie_headers_in_node_js.html

sparfenyuk avatar Oct 02 '10 20:10 sparfenyuk

I see the same problem.

It seems as if it appears to set many cookies in a single Set-Cookie header, but the browser somehow doesn't like it. (I'm using Firefox 3.6 on Ubuntu)

jwatte avatar Nov 15 '10 08:11 jwatte

OK, so this seems simple to fix. The cookie spec says that multiple cookies, as well as parameters, are separated by semicolons only. The cookie-node library separates different cookies with ', '. That should be a single space: " ". Line 92 in index.js, "cookies.join()" should not take a comma.

jwatte avatar Nov 15 '10 08:11 jwatte