Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1174

Show
Ignore:
Timestamp:
06/29/06 12:42:31
Author:
fumanchu
Message:

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').

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/cherrypy-2.x/cherrypy/filters/sessionfilter.py

    r1173 r1174  
    3939import cherrypy 
    4040import basefilter 
     41from cherrypy.lib import httptools 
    4142 
    4243 
     
    155156        gmt_expiration_time = time.gmtime(time.time() + 
    156157                (sess.session_timeout * 60)) 
    157         cookie[cookie_name]['expires'] = time.strftime( 
    158                 "%a, %d-%b-%Y %H:%M:%S GMT", gmt_expiration_time) 
     158        cookie[cookie_name]['expires'] = httptools.HTTPDate(gmt_expiration_time) 
    159159        if cookie_domain is not None: 
    160160            cookie[cookie_name]['domain'] = cookie_domain 
  • trunk/cherrypy/lib/sessions.py

    r1162 r1174  
    2626 
    2727import cherrypy 
     28from cherrypy.lib import http 
    2829 
    2930_session_last_clean_up_time = datetime.datetime.now() 
     
    130131        #cookie[cookie_name]['max-age'] = self.timeout * 60 
    131132        gmt_expiration_time = time.gmtime(time.time() + (self.timeout * 60)) 
    132         cookie[self.cookie_name]['expires'] = time.strftime( 
    133                 "%a, %d-%b-%Y %H:%M:%S GMT", gmt_expiration_time) 
     133        cookie[self.cookie_name]['expires'] = http.HTTPDate(gmt_expiration_time) 
    134134        if self.cookie_domain is not None: 
    135135            cookie[self.cookie_name]['domain'] = self.cookie_domain 

Hosted by WebFaction

Log in as guest/cpguest to create tickets