I have an application that may need to set multiple cookies in one
response with the same name (but different paths, obviously). I
looked at the cookie code in action_controller, and it clearly is
returning only the first cookie in the value array. I also looked a
little bit through the CGI code, and it seems to indicate that it
handles multiple cookies with the same name (especially since it
returns the cookies under one name in an array).
However, even with a local patch to the cookie.rb file, I couldn’t
get my controller’s action to recognize anything but the last cookie
returned by the client (curl, in this case). I will be digging
through the code more tomorrow, but I’m in a bit of a hurry for an
answer - does anyone know if the Ruby CGI code does indeed handle
multiple cookies with the same name properly? Is this just something
that needs to be patched in Rails?