This project is archived and is in readonly mode.
Deleting and then setting a cookie in the same request doesn't work
Reported by Mathias Biilmann | March 18th, 2010 @ 12:25 AM
When first deleting and then setting a cookie during the same request, the cookie doesn't get set.
I've attached a patch against the current rails with a testcase replicating the error.
Got hit by it when trying to use restful authentication with Rails 3 - the cookie with the remember_token never gets set.
Comments and changes to this ticket
-
Mathias Biilmann March 18th, 2010 @ 12:38 AM
Fixed it by deleting the key from @deleted_cookies whenever a cookie is set. Attached a patch with both the testcase and the fix - disregard the first patch...
-
Repository March 18th, 2010 @ 01:05 AM
- State changed from “new” to “committed”
(from [c8dd6f224c9345b7e95cc0203b636e49412b71dc]) Deleting and setting a cookie in the same request was broken
Made sure to remove a cookie from @deleted_cookies when set
[#4211 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/c8dd6f224c9345b7e95cc0203b636e...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 4211 Deleting and then setting a cookie in the same request doesn't work [#4211 state:committed]