A few people have reported lately that they experience a problem with a
chunked output from *::Gzip filters. I think that using DESTROY to
Finalize Output technique as described at
http://perl.apache.org/guide/snippets.html#Using_DESTROY_to_Finalize_Output
will provide a nice workaround. 

If any of you have a few spare minutes, this can be solved on a global
level without changing a line in your original code (and making a nice
contribution to the mod_perl community :). Just write another
Apache::Filter like module, (let's call it Apache::Buffer) which will
buffer all the input and flush it using the above technique. So you'd use:

 <Files *.html>
   SetHandler perl-script
   PerlHandler Apache::OutputChain Apache::GzipChain \
                                   Apache::Buffer Apache::PassFile
 </Files>

This will solve two problems: 

1) chunked gzipped output 
2) will improve the compression as there will be more input to work on at
once for the GZip module.

What do you think?

______________________________________________________________________
Stas Bekman             | JAm_pH    --    Just Another mod_perl Hacker
http://stason.org/      | mod_perl Guide http://perl.apache.org/guide/ 
mailto:[EMAIL PROTECTED]  | http://perl.org    http://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
----------------------------------------------------------------------

Reply via email to