problem setting multiple cookies

Eric Wong normalperson at
Mon Jun 20 23:15:34 EDT 2011

Jason Su <jason at> wrote:
> Here's what I get in the response, with the _test_session cookie line:
> Set-Cookie:first=;; path=/; expires=Thu, 01-Jan-1970
> 00:00:00 GMTsecond=1;; path=/; expires=Mon,
> 21-Jun-2021 02:40:27 GMT
> _test_session=40658e37c9e8b39c5f8389e09682c47b;;
> path=/; HttpOnly
> It doesn't add a second Set-Cookie: line, but the line break seems to work...

Huh?  Which version of unicorn are you using?  The /\n/ splitting in
headers has been in the earliest releases of unicorn...

> 2.3.11 is giving me a ton of trouble.. I've tried it before.. and I
> just tried again with little luck... Is there anything that I can just
> grab from the commits to make it work on 2.3.8?

Look at the individual commits in rails.git.  I just used

  git log -p v2.3.8..v2.3.11 -- actionpack

in rails.git to find those for you.   I just looked for things that
would manipulate cookies/headers.

Eric Wong

More information about the mongrel-unicorn mailing list