Skip to content

Commit

Permalink
Update expire date on expireCookie function
Browse files Browse the repository at this point in the history
According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date and https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie , the date used on expires should be in the same format as Date on HTTP Header.
As of Firefox 60.3.0esr, passing the date in any other format doesn't work and is ignored by the browser.
  • Loading branch information
huine committed Nov 22, 2018
1 parent 49d7e5b commit 77f483a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZPublisher/HTTPResponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def expireCookie(self, name, **kw):
if 'value' in d:
d.pop('value')
d['max_age'] = 0
d['expires'] = 'Wed, 31-Dec-97 23:59:59 GMT'
d['expires'] = 'Wed, 31 Dec 1997 23:59:59 GMT'

self.setCookie(name, value='deleted', **d)

Expand Down

0 comments on commit 77f483a

Please sign in to comment.