Commits

Robert Brewer committed 3cc5361

CP 2.2 and 3.0 fix for #516 (Sessionfilter doesn't format properly the cookie date field "Expires" if the locale is not 'C').

  • Participants
  • Parent commits 5e63288
  • Branches cherrypy-2.x

Comments (0)

Files changed (1)

cherrypy/filters/sessionfilter.py

 
 import cherrypy
 import basefilter
+from cherrypy.lib import httptools
 
 
 class EmptyClass:
         #cookie[cookie_name]['max-age'] = sess.session_timeout * 60
         gmt_expiration_time = time.gmtime(time.time() +
                 (sess.session_timeout * 60))
-        cookie[cookie_name]['expires'] = time.strftime(
-                "%a, %d-%b-%Y %H:%M:%S GMT", gmt_expiration_time)
+        cookie[cookie_name]['expires'] = httptools.HTTPDate(gmt_expiration_time)
         if cookie_domain is not None:
             cookie[cookie_name]['domain'] = cookie_domain
         if cookie_secure is True: