Ticket #461 (defect)
Opened 2 years ago
Last modified 2 years ago
CherryPyWSGIServer should route
Status: closed (fixed)
| Reported by: | fumanchu | Assigned to: | fumanchu |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | CherryPy code | Keywords: | WSGI |
| Cc: |
More people are writing WSGI middleware, and wanting to use middleware between CherryPyWSGIServer and wsgiApp. Currently, CherryPyWSGIServer only serves one wsgiApp at a time, and always at root ("/").
I think CherryPyWSGIServer should be able to host multiple WSGI apps, routing requests to varying WSGI application callables (based on the Request-URI matching a given mount point), and setting SCRIPT_NAME to the "mount point".
Attachments
Change History
02/07/06 18:59:11: Modified by fumanchu
- status changed from new to assigned.
02/07/06 19:00:40: Modified by fumanchu
- attachment routingWSGI.diff added.
Patch for #461 (routing support in the WSGI server)
02/07/06 20:29:55: Modified by dowski
This looks good to me. I suppose having routing capability in the server doesn't prevent someone from using routing middleware, but it is there for people who don't want to bother with something so trivial.
02/10/06 13:31:24: Modified by fumanchu
The patch passes all tests, but there are some lingering issues with the use of Server.httpserver and .httpserverclass as state flags. I hope to work these out over the weekend.
02/14/06 15:35:41: Modified by fumanchu
- status changed from assigned to closed.
- resolution set to fixed.
Fixed in [967].
02/16/06 01:11:51: Modified by fumanchu
- cc deleted.
- keywords changed from 注册香港公司 to WSGI.
- summary changed from 注册香港公司选择瑞丰会计师权威机构 to CherryPyWSGIServer should route.


Attaching a patch implementing such a beast. It simultaneously addresses some lingering issues I have with #455.