Author: mtredinnick
Date: 2007-10-20 02:01:12 -0500 (Sat, 20 Oct 2007)
New Revision: 6549

Modified:
   django/trunk/django/http/__init__.py
Log:
Fixed #5562 -- Changed settings of Expires heading when expiring a cookie to
work with non-compliant browsers (also removes a non-compliance feature of our
own). Thanks, [EMAIL PROTECTED] and SmileyChris.


Modified: django/trunk/django/http/__init__.py
===================================================================
--- django/trunk/django/http/__init__.py        2007-10-20 06:50:16 UTC (rev 
6548)
+++ django/trunk/django/http/__init__.py        2007-10-20 07:01:12 UTC (rev 
6549)
@@ -308,13 +308,8 @@
                 self.cookies[key][var.replace('_', '-')] = val
 
     def delete_cookie(self, key, path='/', domain=None):
-        self.cookies[key] = ''
-        if path is not None:
-            self.cookies[key]['path'] = path
-        if domain is not None:
-            self.cookies[key]['domain'] = domain
-        self.cookies[key]['expires'] = 0
-        self.cookies[key]['max-age'] = 0
+        self.set_cookie(key, max_age=0, path=path, domain=domain,
+                expires='Thu, 01-Jan-1970 00:00:00 GMT')
 
     def _get_content(self):
         if self.has_header('Content-Encoding'):


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to