Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #5562 -- Changed settings of Expires heading when expiring a co…

…okie to

work with non-compliant browsers (also removes a non-compliance feature of our
own). Thanks, caifen1985@gmail.com and SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e60c26d5bb9960866700eccd3392711e523a90e6 1 parent 570e893
Malcolm Tredinnick authored October 20, 2007

Showing 1 changed file with 2 additions and 7 deletions. Show diff stats Hide diff stats

  1. 9  django/http/__init__.py
9  django/http/__init__.py
@@ -308,13 +308,8 @@ def set_cookie(self, key, value='', max_age=None, expires=None, path='/', domain
308 308
                 self.cookies[key][var.replace('_', '-')] = val
309 309
 
310 310
     def delete_cookie(self, key, path='/', domain=None):
311  
-        self.cookies[key] = ''
312  
-        if path is not None:
313  
-            self.cookies[key]['path'] = path
314  
-        if domain is not None:
315  
-            self.cookies[key]['domain'] = domain
316  
-        self.cookies[key]['expires'] = 0
317  
-        self.cookies[key]['max-age'] = 0
  311
+        self.set_cookie(key, max_age=0, path=path, domain=domain,
  312
+                expires='Thu, 01-Jan-1970 00:00:00 GMT')
318 313
 
319 314
     def _get_content(self):
320 315
         if self.has_header('Content-Encoding'):

0 notes on commit e60c26d

Please sign in to comment.
Something went wrong with that request. Please try again.