[mod_python] How do you specify the order in which mod_python Handlers are called?

jarrod roberson jarrod.roberson at gmail.com
Sun Apr 10 12:16:34 EDT 2005

Thanks for the reply Graham, I understand everything about the phases
firing in the order listed in the documentation. I THINK I understand
how to get my mod_python handlers to play nice with the other
handlers. The one thing that is still not clear is handler order when
there are multiple handlers of the same class/type.

basically the problem I am trying to solve is I want to do some
pre-processing before mod_dav gets called. I want to implement some
quota checking, some dir restrictions based on some headers existance
and a couple of other housekeeping tasts before mod_dav gets the
request and then do some cleanup ( commiting or rollingback
transaction ) after mod_dav gets finished.

I figured the correct place to put the quota check and dir
restrictions based on headers is in PythonAuthzHandler. Simply because
if any of the quota checks or other checks fail then mod_dav should
never actually see the request.

I could put them all in one PythonAuthzHandler but that is really not
as "clean" as I would like because each of the tasks are not really
coupled to each other in any way.

So if I have 3 different PythonAuthzHandler's and I want them to
process in a specific order, I have to put them all in one line? Or
can I list them sequentically as in the last part of your response?
That part I did not understand.

More information about the Mod_python mailing list