Ticket #677 (defect)
Opened 2 years ago
Last modified 1 year ago
_cpwsgi requestLine: PATH_INFO SCRIPT_NAME
Status: closed (fixed)
| Reported by: | jrboverhof@lbl.gov | Assigned to: | rdelon |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.2.2 |
| Component: | CherryPy code | Keywords: | |
| Cc: |
When running the wsgiApp out of twisted.wsgi, twisted will set PATH_INFO and SCRIPT_NAME with leading '/'
This causes an infinite redirect loop when accessing "http://localhost"
This also causes the root directory to be placed one level deep. So I can access my root resource only by using "http://localhost/bla/"
when I want to see it at "http://localhost"
This problem can be corrected by adding a line into the requestLine function
resource = resource.replace('//', '/')
I think this is a cherrypy problem because an empty string is equivalant to "/", and because the behavior of cherrypy seems too fragile.
Change History
06/17/07 15:20:41: Modified by fumanchu
06/17/07 15:25:35: Modified by fumanchu
- status changed from new to closed.
- resolution set to fixed.
...but 2.x can certainly get a quick fix for the WSGI interface: see [1672].


Yes, it is too fragile, because it's not following the spec which says:
I've modified trunk to correctly require/coerce this where needed (see [1671]). This should be backported to 3.0.x, but needs some discussion before backporting to 2.x.