Source

CherryPy / cherrypy / _cpserver.py

Author Commit Message Labels Comments Date
Robert Brewer
Changes to socket_host: 1. wsgiserver now treats a host of "" as an alias for INADDR_ANY. The getaddrinfo call now passes host=None and sets AI_PASSIVE in this case. 2. Server.httpserver_from_self doesn't change an empty host ("") to localhost anymore. 3. The test suite has a new {{{--host=<name or IP>}}} flag. 4. The webtest module now allows WebCase.HOST to be "", and will connect on '127.0.0.1' if so. 5. Lots of …
Robert Brewer
Renamed {{{_cpwsgiserver.py}}} to {{{wsgiserver.py}}}, to make it more clear that it's a public, reusable module. Also renamed {{{_cpwsgi.WSGIServer}}} to {{{_cpwsgi.CPWSGIServer}}}, to match the naming convention of the other subclasses in that module.
Robert Brewer
Tweaks.
Robert Brewer
SSL support for _cpwsgiserver. One test fails immaterially. Run "test.py --ssl" to test.
Robert Brewer
Fix for #548 (Rename the before_main hook to before_handler and MainTool to HandlerTool).
Robert Brewer
Fix for #560 (misleading log on socket_host="") for CP 2.2 and CP 3.
Robert Brewer
raise ValueError on cherrypy.server.start() if no httpservers defined.
Robert Brewer
Fix for #557 (socket_file). We should talk about a server.socket_family attribute sometime.
Robert Brewer
API and docstring cleanups: 1. Removed WrongConfigValue, decorate, decorate_all, and ExposeItems. 2. Moved cherrypy.logtime to cherrypy.log.time. 3. Reduced cherrypy.config.globalconf back to just cherrypy.config. 4. Moved _cpconfig.default_conf to config.defaults. .
Robert Brewer
More (final?) config overhaul work: 1. Removed cherrypy.config.get! Instead, you should directly inspect cherrypy.request, response, server, etc. Note that request.config.get still works fine. 2. a) cherrypy.log is now an instance of LogManager. It's still callable, but now is the object you inspect instead of calling config.get("log*"). b) cherrypy.log_access is now cherrypy.log.access. 3. All threads should now have access to d…
Robert Brewer
Made all imports absolute "just in case" for Python 2.5.
Robert Brewer
Changed server.start to server.quickstart, and server.start_all to server.start.
Robert Brewer
Fix for #537 (Support for listening on multiple ports). cherrypy.server now has no "httpserver" attribute; instead, it has an "httpservers" attribute, a dict of the form {server object: bind_addr} where bind_addr is usually (host, port). New start_all method. Calling stop stops all httpservers, and restart stops all then restarts all.
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.
Robert Brewer
Renamed httptools to "http" to reduce confusion with new cherrypy.tools. Moved non-Tool-related code from cptools to {{{lib/__init__}}}. Added docstrings.
Robert Brewer
Removed cherrypy.NotReady. Instead, cherrypy.engine will return HTTP 503 Service Unavailable, and cherrypy.server will raise IOError.
Robert Brewer
Removed duplicate wait_for_occupied_port logic.
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…
Robert Brewer
CP 3 initial checkin. Global filters have been replaced by request.hooks. Lots of renaming and reorg of modules.
Christian Wyglendowski
Addresses #480. init_only can now be set in the config (server.init_only). server.class already existed. server.instance can also be set in the config. It corresponds to the "server" parameter in the cherrypy.server.start() method. Also added "embedded" server environment to simplify running CP embedded in mod_python, FastCGI, another WSGI server, etc.
Robert Brewer
server.stop() works now even if init_only is False.
Robert Brewer
Added meaningful prefixes to names of threads started by CP.
Remi Delon
Allow programs to quit and return an error code; Small fix in sessionauthenticatefilter
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…
Christian Wyglendowski
[965] is the first of two changesets to modify some internal behavior. Unfortunately, it temporarily broke CP in the process. This changeset is a temporary fix to that temporary problem which Robert is addressing more completely.
Christian Wyglendowski
1. Removed request.wsgi_environ from _cphttpserver. 2. Added cherrypy.server.wsgi_app attribute to ease wrapping the CP wsgiApp with WSGI middleware. 3. Modified _cpwsgiserver to set SCRIPT_NAME to '' and to instead put the request path in PATH_INFO. Modified _cpwsgi to deal with this change. 4. Added standalone test for mounting the CP wsgiApp at an alternate SCRIPT_NAME. Not sure how best to integrate it into the test suite.
Robert Brewer
Oops. Forgot to take out a debug line.
Robert Brewer
Fix for server.start lowercase names (serverClass = None is different than serverClass = missing).
Remi Delon
Deprecated "initOnly" and "serverClass". New names are "init_only" and "server_class"
Robert Brewer
seen_threads really should belong to the Server class.
  1. Prev
  2. 1
  3. 2
  4. 3
  5. Next