[mod_python] Publisher and DEFLATE Filter

Clodoaldo clodoaldo.pinto.neto at gmail.com
Sat Dec 2 13:12:22 EST 2006


I want all the Publisher produced pages to be Apache DEFLATEd. So i
added this directive to the virtual server configuration.

   AddOutputFilter DEFLATE py

As the Publisher does not require a py extension this obviously does
not work. The AddOutputFilterByType directive is said to be deprecated
in the 2.2.3 manual. So i add req.add_output_filter('DEFLATE') to the
script and it works. But it will have to be added to all the scripts.
Is there a way to set the DEFLATE filter to all Publisher scripts?

If i use "SetOutputFilter DEFLATE" it will deflate everything
including images and i will have to somehow disable it for the files
or directories i eventually don't want to be deflated.

I looked at the PythonOutputFilter but to activate it the
AddOutputFilter directive must be used and it is back to the original
problem. Or do I understand it wrong?

Regards,
-- 
Clodoaldo Pinto Neto


More information about the Mod_python mailing list