Neil Schemenauer wrote: >>I think mod_scgi doesn't set PATH_INFO, but I haven't checked it >>specifically. I can check it tomorrow if necessary. > > > > Unfortunately I have no time to read and understand this whole > thread. Hopefully I'm not too far off base: > > * If you use mod_scgi and the SCGIServer command (i.e. in > combination with Location or LocationMatch) then PATH_INFO > while always be empty and SCRIPT_NAME will contain the whole > path. In that case you can use the --script-name argument to > the Quixote scgi server to specify the script name. > > * With scgi 1.6 (1.5 has a bug so 1.6 will be released > directly), you can use the SCGIMount directive. If you use it > then SCRIPT_NAME and PATH_INFO will be set as expected. This > is the prefered way of using mod_scgi now and the > --script-name option becomes unnecessary. > > For your specific problem, if you have: > > SCGIMount /rl localhost:3000 > > then the URI /rl/ will result in SCRIPT_NAME="/rl" and PATH_INFO="/". > If the URI is /rl then SCRIPT_NAME="/rl" and PATH_INFO="". That > will trigger the following assertion in Quixote: > > Traceback (most recent call last): > File "/home/nas/lib/python/quixote/publish.py", line 273, in process_request > output = self.try_publish(request) > File "/home/nas/lib/python/quixote/publish.py", line 248, in try_publish > assert path[:1] == '/' > AssertionError > > I think we could change Quixote to do a redirect (just like in other > cases when a trailing slash is missing) instead of raising an error. > > Neil Redirect isn't going to do anything in my case I already have a trailing slash. I'm going to http://www.example.com/ in my browser.SCGIMount / localhost:4000 Traceback contains: PATH_INFO QUERY_STRING REQUEST_URI / SCGI 1 SCRIPT_NAME / SCRIPT_URI http://www.example.com/ SCRIPT_URL / Doesn't this piece of code from mod_scgi.c tell the story though? SCRIPT_NAME is set to r->uri when there isn't r->path_info. Perhaps something like if (PATH_INFO="" and REQUEST_URI="/") then SCRIPT_NAME=""? It's late and I just making a stab in the dark. And isn't the second add_header(t, "SCRIPT_NAME", r->uri); in the else redundant, since it gets set before the if and gets set in the else so it happens either way? add_header(t, "SCRIPT_NAME", r->uri); if (r->path_info) { int path_info_start = find_path_info(r->uri, r->path_info); add_header(t, "SCRIPT_NAME", apr_pstrndup(r->pool, r->uri, path_info_start)); add_header(t, "PATH_INFO", r->path_info); } else { /* skip PATH_INFO, don't know it */ add_header(t, "SCRIPT_NAME", r->uri); } Here is a discussion about something similar on the Web-SIG mailing list in a thread titled WSGI tests: http://mail.python.org/pipermail/web-sig/2004-September/000925.html Looking in Python Web Server Gateway Interface v1.0 doesn't give me much info either. http://www.python.org/peps/pep-0333.html > SCRIPT_NAME > The initial portion of the request URL's "path" that corresponds to the application object, so that the application knows its virtual "location". This may be an empty string, if the application corresponds to the "root" of the server. > PATH_INFO > The remainder of the request URL's "path", designating the virtual "location" of the request's target within the application. This may be an empty string, if the request URL targets the application root and does not have a trailing slash.Order allow,deny Allow from all