mod_python, multiple calls to PythonAuthenHandler
roderik
rune.hansen at scanmine.com
Mon Nov 8 02:52:13 EST 2004
I've posted this question on the mod_python mailing list but didn't get
much response, so I thought I'd post it here.
It seems to me that for each path element in a URI a mod_python handler
will be invoked. This applies to PythonAuthenHandler,
PythonHeaderParserHandler and so on.
Since I'm making a database request in my PythonAuthenHandler, this
quickly becomes a problem.
Example:
http://lucene.moonspawn.scanmine.com/ =>
AuthenHandler::authenhandler called: 1
index got called once
http://lucene.moonspawn.scanmine.com/SearchHandler.py/search =>
AuthenHandler::authenhandler called: 1
AuthenHandler::authenhandler called: 2
/search got called once
http://lucene.moonspawn.scanmine.com/search.html => (using mod_rewrite)
AuthenHandler::authenhandler called: 1
AuthenHandler::authenhandler called: 2
AuthenHandler::authenhandler called: 3
/search got called once
I get the same behavior on three separate installations
So, either I've got a miss-configuration which results in multiple calls
to handlers or.., this is expected behavior, and there is a technique to
avoid this or..., this is expected and, for reasons that escapes me,
desired behavior.
I'd greatly appreciate any help and suggestion
regards
/rune
More information about the Python-list
mailing list