[mod_python] multiple requests to authenhandler for a single url

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Oct 6 13:16:18 EDT 2005




On Thu, 6 Oct 2005, reghigh wrote:

> Also why would /x/x result in two requests but /x/y in one (using 
> <Location /x>)?

I don't know, in my test (mod_python 3.1.3, httpd 2.0.54), when no actual 
'x' directory exists, the traversal stops right there. When x does exist, 
it is called for /x/y, which is at it should be - it assumes that 'y' is a 
file in the directory 'x' (even if y does not exist).

Also there are a couple of other things in your prior e-mail that do not 
make a lot of sense. Given:

<VirtualHost *:80>
   ServerName static
   DocumentRoot <omitted>

   PythonPath "['<omitted>'] + sys.path"
   PythonAuthenHandler test
   PythonDebug On

   <Location /x>
       AuthType Basic
       AuthName "Restricted Area"
       Require valid-user
   </Location>
</VirtualHost>

You say that

   /xx -> not processed by handler

that cannot be if the "PythonAuthenHandler test" is at the VirtualHost 
level. I also don't see SetHandler/AddHandler for mod_python - is that at 
the server level?

Also I'm not sure how your request continues processing even though you're 
raising an exception - in my test the request processing stops with 
'Internal Server Error' as soon as the first exception is raised.

In any event - when the authen handler is called is not controlled by 
mod_python, it's something that is in the httpd territory. It would be 
nice perhaps to get to the bottom of what this behaviour should be and 
summarize it for the list.

Thanks,

Grisha


More information about the Mod_python mailing list