I''ve run into an issue with my rails application being unable to properly set cookies on Mongrel 0.3.18. If I run the simplified code below in Mongrel 3.14.4, both cookies are properly sent to and saved by the browser. With the same code in 0.3.18, only the auth_token cookie is created (if I switch them, only the userid as it will only properly create the first cookie in the list.) I''m at home right now, but when I get back into work tomorrow, I''ll try to install 0.3.15 and see if the problem exists there as well. Thanks. def login cookies[:auth_token] = { :value => "auth", :expires => 10.years.from_now.utc } cookies[:userid] = { :value => "100", :expires => 10.years.from_now.utc } end
On Thu, 30 Nov 2006 19:14:17 -0600 "Joey Geiger" <jgeiger at gmail.com> wrote:> I''ve run into an issue with my rails application being unable to > properly set cookies on Mongrel 0.3.18. If I run the simplified code > below in Mongrel 3.14.4, both cookies are properly sent to and saved > by the browser. With the same code in 0.3.18, only the auth_token > cookie is created (if I switch them, only the userid as it will only > properly create the first cookie in the list.) > > I''m at home right now, but when I get back into work tomorrow, I''ll > try to install 0.3.15 and see if the problem exists there as well. > > Thanks. > > def login > cookies[:auth_token] = { :value => "auth", :expires => 10.years.from_now.utc } > cookies[:userid] = { :value => "100", :expires => 10.years.from_now.utc } > endAha! You''re the guy! No, that''s because I created a change which eliminated duplicate headers but we weren''t quite sure what headers should be allowed to duplicate. I''ll push a new release out that includes an exception list with the cookie headers. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30-Nov-06, at 9:49 PM, Zed A. Shaw wrote:> On Thu, 30 Nov 2006 19:14:17 -0600 > "Joey Geiger" <jgeiger at gmail.com> wrote: > >> I''ve run into an issue with my rails application being unable to >> properly set cookies on Mongrel 0.3.18. > > No, that''s because I created a change which eliminated duplicate > headers but we weren''t quite sure what headers should be allowed to > duplicate. > > I''ll push a new release out that includes an exception list with > the cookie headers.Zed, the only headers I can think of that you''d want to legitimately send multiple times AND with different values each time, are: Set-Cookie Set-Cookie2 Warning WWW-Authenticate (eg. when using both Basic and Digest auth) There might be more, but this will be a good start for an exception list. - -- Thanks, Dan __________________________________________________________________ Dan Kubb Autopilot Marketing Inc. Email: dan.kubb at autopilotmarketing.com Phone: 1 (604) 820-0212 Web: http://autopilotmarketing.com/ vCard: http://autopilotmarketing.com/~dan.kubb/vcard __________________________________________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) iD8DBQFFb99G4DfZD7OEWk0RAjiOAKCfChH0Qs8ZfmtaUWw6TSPJgU3H9gCeP2Is o5Q7T4p9vrSK0bEl1XFwTVU=7mVb -----END PGP SIGNATURE-----