On Tuesday, January 21, 2003, at 01:14 AM, Stas Bekman wrote:
Thank you! I forgot to check the Apache:: tree since I rarely use those modules. The Apache::Compress author pointed these out to me in a separate email.Chris Dolan wrote:I'm writing a module which subclasses CGI.pm and automatically gzips output if the browser has "Accept-Encoding: gzip" set and the script emits a text/html mimetype. To be as drop-in as possible, it uses select() to make the gzip filter the primary output channel, and changes it back when the CGI object is destroyed. It's relies on IO::Zlib to do the heavy lifting.
Questions:
1) I was unable to find anything similar in CPAN. Does anybody know if I'm duplicating
existing effort (other than mod_gzip for Apache of course)?
You are. Check these modules at least:Apache::Compress Apache::GzipChain
However after some discussion with the Apache::Compress author, and examination of the source code, I'm convinced that my module likely has a very different potential audience, since those two are mod_perl/server-config specific and mine tries to more "user-space". That is, I focus on doing the compression in the space of the script, not the server process. I think this empowers people who do not have control over the Apache conf, or those who aren't running Apache, or those who want to be able to turn the compression on or off at will.
Thanks again for the feedback.
Chris