diff options
| author | Raphael Merx <raphaelm@captricity.com> | 2015-10-30 15:05:11 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-11-18 07:47:40 -0500 |
| commit | 0a19f8d4fc864de481eac1b76c799ffd6ced4e91 (patch) | |
| tree | 29a2fe6369a874560e9e51a897467d90826d18a8 /django | |
| parent | 6258e163352690faf20bfc92c12468316d1a47ae (diff) | |
Fixed #25644 -- Fixed reset cookie expiry date bug.
Setting a cookie with the same name as a previously deleted cookie
would set its expiry date to 'Thu, 01-Jan-1970 00:00:00 GMT'.
Diffstat (limited to 'django')
| -rw-r--r-- | django/http/response.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/http/response.py b/django/http/response.py index ed5c14eef8..94d14ddb54 100644 --- a/django/http/response.py +++ b/django/http/response.py @@ -190,6 +190,8 @@ class HttpResponseBase(six.Iterator): max_age = max(0, delta.days * 86400 + delta.seconds) else: self.cookies[key]['expires'] = expires + else: + self.cookies[key]['expires'] = '' if max_age is not None: self.cookies[key]['max-age'] = max_age # IE requires expires, so set it if hasn't been already. |
