summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-20 07:01:12 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-20 07:01:12 +0000
commite60c26d5bb9960866700eccd3392711e523a90e6 (patch)
tree19a649c4f565e2b2bef93ec89bdb87e1b9a0ffed
parent570e8936d9aaf217ef61d9b46fb9f5361f013c28 (diff)
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, caifen1985@gmail.com and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/http/__init__.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 6d13973097..51744a0866 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -308,13 +308,8 @@ class HttpResponse(object):
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'):