delete_cookie function in HttpResponse should set 'expires' to a time string, not 0
|Reported by:||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
- In this function,
self.cookies[key]['expires'] = 0
- Here the expire time set to a number, but it should set to a time string. The browser can't set the expire time for this cookie, so it will not be removed.I just set the expires time to a GMT beginning time string, and it works correct.
self.cookies[key]['expires'] = "Thu 1-Jan-1970 00:00:00 GMT"
Change History (7)
comment:1 Changed 10 years ago by
|Summary:||delete_cookie function in HttpResponse object doesn't work. → delete_cookie function in HttpResponse should set 'expires' to a time string, not 0|
|Triage Stage:||Unreviewed → Ready for checkin|