[Checkins] SVN: zope.browserresource/trunk/src/zope/browserresource/file.py Use formatdate from email.utils instead of hand-crafted strftime pattern.
Dan Korostelev
nadako at gmail.com
Tue Aug 25 07:54:47 EDT 2009
Log message for revision 103197:
Use formatdate from email.utils instead of hand-crafted strftime pattern.
Changed:
U zope.browserresource/trunk/src/zope/browserresource/file.py
-=-
Modified: zope.browserresource/trunk/src/zope/browserresource/file.py
===================================================================
--- zope.browserresource/trunk/src/zope/browserresource/file.py 2009-08-25 11:48:42 UTC (rev 103196)
+++ zope.browserresource/trunk/src/zope/browserresource/file.py 2009-08-25 11:54:46 UTC (rev 103197)
@@ -216,9 +216,7 @@
# Cache for one day by default
response.setHeader('Cache-Control', 'public,max-age=%s' % secs)
t = time.time() + secs
- response.setHeader('Expires',
- time.strftime("%a, %d %b %Y %H:%M:%S GMT",
- time.gmtime(t)))
+ response.setHeader('Expires', formatdate(t, usegmt=True))
class FileResourceFactory(object):
More information about the Checkins
mailing list