[Web-SIG] WSGI Utils & SCGI/Quixote.
ianb at colorstudy.com
Wed Dec 1 02:42:05 CET 2004
Colin Stewart wrote:
> (I've subscribed to the list so we can continue discussion purely on-list)
>>>The only real problem in getting this to work was that wsgiServer.py
>>>expected *every* URL under /demo to be registered to demo_obj. I
>>>changed the wsgiServer.py code to allow for partial matches & munged
>>>the SCRIPT_NAME and PATH_INFO variables appropriately. I also added
>>>REQUEST_URI because Quixote uses it for a few things; this should
>>>probably be moved into QWIP.
>>I think I'm going to have to call that point out in the PEP
>>somewhere. Technically, the PEP requires that SCRIPT_NAME and PATH_INFO be
>>set, but I think perhaps some folks have missed the implications of that
>>for the URL path space.
> The clarification is good - it certainly wasn't clear to me the first
> time I read it!
> A quick question about the SCRIPT_NAME: If an application registers for
> the path '/testapp/' should SCRIPT_NAME be set to '/testapp',
> '/testapp/', or even 'testapp'?. I've implemented the first one in my
> latest version of wsgiServer, but I want to make sure that's correct.
Because PATH_INFO must either be empty or start with a /, SCRIPT_NAME
should be "/testapp" (no trailing /). If the script registers for the
root (i.e., all URLs), SCRIPT_NAME should be "", and PATH_INFO contains
the entire URL.
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Web-SIG