problem setting multiple cookies

Jason Su jason at
Mon Jun 20 19:40:16 EDT 2011

Hey guys,

When I try to set multiple cookies in one request, the 'Set-Cookies'
header in the http response doesn't look right -- all the cookies are
set without any line breaks.

Looks like this:

Set-Cookie:first=;; path=/; expires=Thu,
01-Jan-1970 00:00:00 GMTsecond=1;; path=/;
expires=Sun, 20-Jun-2021 23:34:30 GMT

Should look more like this, which is what I got from a fresh Rails project test:

Set-Cookie:first=33; path=/
second=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT
third=69; path=/

In the first example, neither cookies (first/second) are set. The
second example, all 3 cookies are set.

I think it's happening somewhere here, but I can't figure out what's
going on...

Any help appreciated, thanks in advance!


More information about the mongrel-unicorn mailing list