Hi Alex,
Can anyone shed any light on this, or suggest an alternative way to dynamically compress the output from mod_perl?
We are using Compress::Zlib
use Compress::Zlib
my $compress = Compress::Zlib::memGzip($output); my $length = length($compress);
my $header = "Content-Type: text/html\n"; $header .= "Content-Encoding: gzip\n"; $header .= "Content-Length: $length\n"; $header .= "Cache-Control: max-age=1\n"; $header .= "Expires: $now\n"; $header .= "Last-Modified: $now\n\n";
if ( $ENV{HTTP_ACCEPT_ENCODING} =~ /gzip/o && $length_output > 200 ) {
print $header; print $compress;
} else { # Normal Header print $output; }
Regards, Jens
-- Lieber von Picasso gemalt als vom Leben gezeichnet
E-Mail: [EMAIL PROTECTED] NEU: http://www.atomix.de/ AISware: http://www.aisware.de/ <- mod_perl CMS
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html