Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #1118 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] expire cookies on deletion

Reported by: todd@robotcoop.com Assigned to: David
Priority: normal Milestone: 1.0
Component: ActionPack Version: 0.11.0
Severity: minor Keywords: cookies
Cc:

Description

Currently the cookies.delete method sets the cookie value to an empty string. This patch sets the expiration date into the past so the cookie is nonexistent to the browser (and to any javascript cookie functions that might test for it having a null value rather than an empty string).

For the record, I tried creating a unit test for this but it seems validation would depend on the browser's handling of expiration, so I'm not sure if it's possible to have a valid test here...

Attachments

expire_cookie_on_delete.diff (0.7 kB) - added by todd@robotcoop.com on 04/15/05 22:06:05.
patch to expire cookies on delete

Change History

04/15/05 22:06:05 changed by todd@robotcoop.com

  • attachment expire_cookie_on_delete.diff added.

patch to expire cookies on delete

04/17/05 07:19:59 changed by david

  • status changed from new to closed.
  • resolution set to fixed.