Issue #455 resolved
Enable CP's WSGI server for middleware (and other WSGI related enhancements)
- cherrypy.server.start() accepts a new parameter; middleware. The middleware wraps (potentially other middleware and) _cpwsgi.wsgiApp.
- The path to the CherryPy app now occupies the WSGI PATH_INFO variable (as opposed to SCRIPT_NAME). I am not a WSGI expert, but this should keep CherryPy from "owning" the root path of the request and allows other apps (and middleware) to coexist better with it.
- cherrypy.request.wsgi_environ now contains the WSGI environ for the request. This is immediately useful for WSGI session middleware and could be for other WSGI middleware that wants to share data structures, etc, with wrapped apps.
The CP test suite passes with the patch applied.
I am only beginning to "get" the WSGI PEP, so I might have made some incorrect assumptions. Please see the attached patch and example application and give me feedback.