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

Ticket #680: cherrypy_session.patch

Line 
1 diff -ur cherrypy/_cptools.py cherrypy_session/_cptools.py
2 --- cherrypy/_cptools.py        2007-02-19 23:51:03.000000000 +0000
3 +++ cherrypy_session/_cptools.py        2007-04-02 11:39:48.000000000 +0100
4 @@ -230,9 +230,6 @@
5          else:
6              # Don't lock
7              pass
8 -       
9 -        hooks.attach('before_finalize', _sessions.save)
10 -        hooks.attach('on_end_request', _sessions.close)
11  
12  
13  class XMLRPCController(object):
14 diff -ur cherrypy/lib/sessions.py cherrypy_session/lib/sessions.py
15 --- cherrypy/lib/sessions.py    2007-02-19 23:51:03.000000000 +0000
16 +++ cherrypy_session/lib/sessions.py    2007-04-02 11:41:13.000000000 +0100
17 @@ -451,6 +451,10 @@
18          return
19      request._session_init_flag = True
20      
21 +    # Make sure to clean up
22 +    request.hooks.attach('before_finalize', save)
23 +    request.hooks.attach('on_end_request', close)
24 +
25      # Check if request came with a session ID
26      id = None
27      if name in request.cookie:

Hosted by WebFaction

Log in as guest/cpguest to create tickets