[Web-SIG] Relationship between SCRIPT_NAME and PATH_INFO.
pywebsig at alan.kennedy.name
Sun Jan 28 20:07:56 CET 2007
> Should a WSGI adapter for a web server which allows a mount point to
> have a trailing slash specifically flag as a configuration error an
> attempt to use such a mount point given that it appears to be
> incompatible with WSGI?
OK, I'll have a go.
I think the question boils down to the following:
Assume an application mount point of "/application".
If a request is received for
Then it will (and should) be redirected to the URL
Is that new URL to be interpreted as
or interpreted as
I think that the WSGI interpretation is the first interpretation, and
the correct one, because it gives correct results when deriving
relative URLs for resources contained within the application.
Is that addressing the question?
> It therefore seems that the idea of the mount point for an
> application having a trailing slash may be incompatible
> with WSGI. Can this be considered to be the case or is there
> some other way one is meant to deal with this?
I don't know about "incompatible", although it obviously creates the
double-slash problem with computed URLs.
Perhaps the Apache "policy" on this issue is influenced by its origins
as a http server for serving hierarchies of directories and files from
When it comes to CGI though, Apache does the right thing and passes
to CGI scripts.
I don't know if this provides any insight into whether or not mounting
applications with a trailing slash is an error.
Does that help at all?
More information about the Web-SIG