Django

Code

Changeset 6549

Show
Ignore:
Timestamp:
10/20/07 02:01:12 (1 year ago)
Author:
mtredinnick
Message:

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?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/http/__init__.py

    r6548 r6549  
    309309 
    310310    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') 
    318313 
    319314    def _get_content(self):