[mod_python] Publisher and DEFLATE Filter

Jorey Bump list at joreybump.com
Sat Dec 2 18:46:43 EST 2006

Graham Dumpleton wrote:

> Of if using mod_python 3.3 just use:
>   PythonFixupHandler install_filters
> In that handler module have:
>   from mod_python import apache
>   def fixuphandler(req):
>     if req.content_type == 'text/html':
>       req.add_output_filter('INCLUDES')
>     return apache.OK

Should that be:


> To me this is getting to what mod_python is really about, it is a means 
> of programming
> Apache by using all the various phases as they are intended and not just 
> a jumping off
> point for content handlers to WSGI, Django, TurboGears etc. :-)

This *is* exciting, but when administering a server that supports 
mod_python, PHP, CGI, ColdFusion, static HTML, etc., it's more expedient 
to configure mod_deflate in the main httpd config, so that it applies to 
all virtual hosts and matching content.

More information about the Mod_python mailing list