Re: SCGI + Quixote, Location / ?

Neil Schemenauer <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
On Wed, Aug 10, 2005 at 08:06:59PM -0700, Mike Orr wrote:
> I don't understand the question.  I go to /rl, it redirects to /rl/, 
> which in my app redirects to /rl/login because the user isn't logged 
> in.  If I type /rl/, it redirects to /rl/login, and the page shows 
> properly, with stylesheet and logo which are StaticFile's.

[...]

> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.