Ticket #5562: 5562.patch

File 5562.patch, 844 bytes (added by Chris Beaven, 17 years ago)
  • django/http/__init__.py

     
    304304                self.cookies[key][var.replace('_', '-')] = val
    305305
    306306    def delete_cookie(self, key, path='/', domain=None):
    307         self.cookies[key] = ''
    308         if path is not None:
    309             self.cookies[key]['path'] = path
    310         if domain is not None:
    311             self.cookies[key]['domain'] = domain
    312         self.cookies[key]['expires'] = 0
    313         self.cookies[key]['max-age'] = 0
     307        self.set_cookie(key, max_age=0, expires='Thu, 01-Jan-1970 00:00:00 GMT',
     308                        path=path, domain=domain)
    314309
    315310    def _get_content(self):
    316311        content = smart_str(''.join(self._container), self._charset)
Back to Top