Issue #563 resolved

session handling hangs server

guest
created an issue

The following code hangs the CP 3.0 beta (SVN of 15-09-2006) server sporadically if session handling is enabled:

{{{

ready for python 2.5

from future import division, generators, nested_scopes

import sys, cherrypy, logging, ConfigParser, random, os, time, traceback from cherrypy import HTTPRedirect

web-interface

class WIRoot(object): #static = cherrypy.tools.staticdir.handler(section='static', root="/your/static/dir/", dir='.')

    def __init__(self):
            self.exposed = True

    def index(self):
            raise HTTPRedirect("/main")
    index.exposed = True

    def main(self):
            return '<html>Main</html>'
    main.exposed = True

if name == 'main': cherrypy.tree.mount(WIRoot())

    cpcfgfile = 'cherrypy.cfg'
    cherrypy.config.update(cpcfgfile)

    try:
            print("Initialized, starting CP server... ")
            cherrypy.server.quickstart()
            print("Starting CP engine... ")
            cherrypy.engine.start()
    except KeyboardInterrupt:
            print("Received keyboard interrupt, shutting down")
    except:
            raise

}}}

Comments (2)

  1. Log in to comment