Source

CherryPy_subhandler / _cpengine.py

Author Commit Message Labels Comments Date
Robert Brewer
Lots of mixedCase to lower_with_underscores.
Branches
cherrypy
Robert Brewer
New deadlock monitor which sets Response.timed_out to True if Response.time < now - config.get("deadlock_timeout"). The request thread periodically checkes Response.timed_out and raises TimeoutError if it is True. Current checks are in HookMap.run, Request.respond, Body.__set__, and Response.finalize, more can be added later if needed.
Branches
cherrypy
Christian Wyglendowski
Giving NotReadyRequest a protocol attribute.
Branches
cherrypy
Robert Brewer
Replaced request.remote_addr, remote_port, and remote_host with a single "remote" attribute, an instance of lib.http.Host, which has "ip", "port" and "name" attributes. Added a similar request.local attribute. Changed request() signature to (local, remote, scheme). This allows requests run behind multiple HTTP servers to know the address info for their particular connection.
Branches
cherrypy
Robert Brewer
WSGI-related changes: 1. Changed Request.run from request_line arg to deconstructed args: method, path, query_string, and protocol. 2. Moved HTTP protocol checking from _cprequest to _cpwsgiserver. What was cherrypy.response.version is now cherrypy.request.protocol (tuple form of SERVER_PROTOCOL). request.version and response.version attributes removed. _cpwsgiserver now writes out server.protocol, not SERVER_PROTOCO…
Branches
cherrypy
Robert Brewer
Fix for #438 (autoreload.py: Server fails to start if a .pyc is imported with no corresponding .py).
Branches
cherrypy
Robert Brewer
silently disable signal handlers when running behind Apache (i.e. when "import _cprequest" is not done in the main thread).
Branches
cherrypy
Robert Brewer
Oops. Windows doesn't have SIGHUP.
Branches
cherrypy
Robert Brewer
Fix for #540.
Branches
cherrypy
Robert Brewer
Merged the reexec branch. Autoreload now uses exec instead of spawn, and therefore never runs more than one process at a time. There's a new test for autoreload in test_states.py. The state-management for the HTTP server is a mess, by the way. I only got test_states' KeyboardInterrupt test working by inlining the client threads. So wait() and interrupts, etc. only really work when there's a single master thread. This needs fixed.
Branches
cherrypy
Robert Brewer
Cleanup of cherrypy and cherrypy.config namespaces. Changed 'log_config_options' to 'log_config'. Moved cherrypy.set_config to cherrypy.config.wrap.
Branches
cherrypy
Robert Brewer
Moved coverage out of the core.
Branches
cherrypy
Robert Brewer
More unnecessary imports removed.
Branches
cherrypy
Robert Brewer
Made Engine.stop check Engine.state. This allows e.g. mod_python to call stop() once per thread on shutdown.
Branches
cherrypy
Robert Brewer
Removed cherrypy.NotReady. Instead, cherrypy.engine will return HTTP 503 Service Unavailable, and cherrypy.server will raise IOError.
Branches
cherrypy
Robert Brewer
Comment improvements.
Branches
cherrypy
Robert Brewer
Moved the profiler setup into _cprequest (so it's all in one place now).
Branches
cherrypy
Robert Brewer
Root and config are now isolated per app: 1. object_path is now called path_info, and there's a new request.script_name attribute. This should equal the mount point of the current application. 2. cherrypy.root is gone, use cherrypy.request.app.root for now instead. Perhaps cherrypy.root will reappear and point to that. 3. cherrypy.tree.mount_points has been replaced with cherrypy.tree.apps, a dict of the form {script_name: Application(…
Branches
cherrypy
Robert Brewer
Moved the following config keys out of the "server." namespace (so that "server." may mean "httpserver"): * default_content_type * log_access_file * log_config_options * log_file * log_file_not_found * log_request_headers * log_to_screen * show_tracebacks * throw_errors
Branches
cherrypy
Robert Brewer
Separated cherrypy.server (HTTP) from cherrypy.engine (app): 1. Most CP apps must now make both a call to cherrypy.server.start(server=None) and a call to cherrypy.engine.start(blocking=True). 2. The on_start_server_list and on_stop_server_list are now on_start_engine_list and on_stop_engine_list. 3. "start_with_callback" is now an attribute of Engine. So is "request". 4. Server.start now takes a single "server" arg, which can be a server instance, a st…
Branches
cherrypy
Robert Brewer
Removed a bunch of instances of the word "filter".
Branches
cherrypy
Robert Brewer
CP 3 initial checkin. Global filters have been replaced by request.hooks. Lots of renaming and reorg of modules.
Branches
cherrypy
Robert Brewer
New Engine.response_class attribute (which allows a new -null switch for benchmark.py, to show how much of the request is spent in the HTTP server as opposed to the Request object).
Branches
cherrypy
Robert Brewer
server.stop() works now even if init_only is False.
Branches
cherrypy
Robert Brewer
Another re-raise of SystemExit.
Branches
cherrypy
Robert Brewer
Final fix for #461 and #455: 1. There's a new _cpengine module which isolates the "app server" from the "HTTP server" state-management logic. _cpserver.Server inherits from _cpengine.Engine. The _cpengine module should remain clean so that it can be used with few changes in CP 3, at which point we can rewrite the http server API. 2. Fixed an issue with the native HTTP server--it wasn't truly restartable (closed but didn't r…
Branches
cherrypy