[mod_python] Difference between filter.pass_on() and filter.disable()?

Jean Lagarde jean.lagarde at gmail.com
Tue Dec 9 23:29:20 EST 2008


Hi all,
The subject says it all. The documentation seems a little sparse on the
topic. The description of pass_on is:

Passes all data through the filter without any processing.

The description of disable is:

Tells mod_python to ignore the provided handler and just pass the data on.
(which also states that mod_python uses that one internally).

"passes all data through" and "just pass the data on" sound like the same
thing to me. What is the additional functionality to "ignore the provided
handler"? I assume that there is a difference between the two methods and I
would like to know what it is no matter how subtle. I'm looking for the most
CPU efficient way to decide early on in the execution of a filter that we
don't want to filter a particular request in any way, but maybe
understanding the difference would help me to make a better use of
mod_python filters in other ways.

I did try to use both in code, and on one server with one version of Apache
2 (and other components) it seemed to make no functional difference
(although I did not attempt to closely measure CPU usage), whereas on
another server with an earlier version of Apache 2 (and other components),
using disable() caused no error, but dropped values from POST forms passed
on to PHP scripts.

Thanks for any info. I did search the lists, but only found one comment on
someone's code from Graham that "Normally 'filter.pass_on()' would be used
here, not 'filter.disable()'", but without explaining why.

-- jean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20081209/91a0ba04/attachment.html


More information about the Mod_python mailing list