On Aug 10, 2005, at 1:20 PM, mso@oz.net wrote:
>
> I'll just plug my longstanding request that Quixote redirect path
> '' (the
> mount point itself) to '/'. That's no more magical than adding a
> slash
> redirect to a directory, which Quixote and all other webservers do.
> It's
> the only reasonable interpretation of '' ("Duh, they must be trying
> to get
> to the home page.") Otherwise everybody has to put a redirect in
> their
> Apache config.
I don't think Quixote can really know what the mount point is unless
it is
told with the SCRIPT_NAME. If I understand your request, it would
be to to traverse SCRIPT_NAME if PATH_INFO is empty.
This would, in effect, be assuming without evidence
that the real mount point is '/', and the server is being stupid.
This does seem to be the common case. If this assumption is wrong,
the behavior would be very confusing.
Index: publish.py
===================================================================
--- publish.py (revision 27175)
+++ publish.py (working copy)
@@ -246,8 +246,9 @@
Exceptions are handled by the caller.
"""
self.start_request()
- path = request.get_environ('PATH_INFO', '')
- assert path[:1] == '/'
+ path = (request.get_environ('PATH_INFO') or
+ request.get_environ('SCRIPT_NAME'))
+ assert path and path[:1] == '/', repr(request.environ)
It would good to have the server provide a proper environment,
and I think we're almost there with mod_scgi. Does this problem also
exist with lighttpd's scgi support?