[mod_python] Multiple calls to authenhandler()

Rune Hansen rune.hansen at scanmine.com
Wed Nov 3 09:58:27 EST 2004


Hi,
I get one call to authenthandler() when I access http://www.mysite.com/
I get two calls to authenthandler() when I access 
http://www.mysite.com/myHandler.py/search
and..
I get three(!) calls to authenthandler() when I access 
http://www.mysite.com/search.html, where search.html is an Apache 
Rewrite of myHandler.py/search.

Does anyone know how to avoid this?

My Apache directory directive is:
<VirtualHost *:80>
	ServerName www.myhost.com
	ServerAdmin root at host
	DocumentRoot /var/www/html/search
	.
</VirtualHost>
<Directory "/var/www/html/search">
	.
	RewriteEngine On
	RewriteBase /
	RewriteRule search.html "myHandler.py/search"
	DirectoryIndex myHandler.py
	AddHandler mod_python .py
	PythonHandler mod_python.publisher
	PythonAuthenHandler AuthentHandler
	AuthType Basic
	AuthName "Restricted Area"
	require valid-user
	PythonPath "sys.path+['...']"
	PythonDebug On
</Directory>

It will kill performance if I have to re-verify the user three times 
for each request. Sessions are, unfortunately, not an option.

Any suggestions will be most welcome :)

regards

/rune


"So as far as I'm concerned, SOAP is not XML, nor is it useful to even a
fraction of the degree to which it is destructive."
- Uche Ogbuji 



More information about the Mod_python mailing list