#25644: Setting a cookie after deletion should not keep 1970 as expiry date
-------------------------------+------------------------------------
     Reporter:  rollokb        |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  HTTP handling  |                  Version:  1.8
     Severity:  Normal         |               Resolution:
     Keywords:  cookies http   |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  1              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by felixxm):

 This seems easy to fix
 {{{#!diff
 --git a/django/http/response.py b/django/http/response.py
 index ed5c14e..cdc098f 100644
 --- a/django/http/response.py
 +++ b/django/http/response.py
 @@ -216,7 +216,7 @@ class HttpResponseBase(six.Iterator):

      def delete_cookie(self, key, path='/', domain=None):
          self.set_cookie(key, max_age=0, path=path, domain=domain,
 -                        expires='Thu, 01-Jan-1970 00:00:00 GMT')
 +                        expires='')

      # Common methods used by subclasses
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25644#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.c00b6a3db6f779719c9fea2ea3ca1ec7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to