Hi,

I would like to apply gzip or inflate compression on the response from
Apache::ASP, because my application generates a lot low-entropy
table-structures which can be compressed down to 90-95%. On a normal CGI
script I would do something like:

print "Content-type: text/html\n";
print "Pragma: no-cache\n";
if($ENV{HTTP_ACCEPT_ENCODING} =~ /gzip/) {
  print "Content-Encoding: gzip\n\n";
  print Compress::Zlib::memGzip($out);
} else {
  print "\n";
  print $out;
}

where $out sucks up all the output during execution. I can't get it to work
with Apache::ASP, though. As Apache::ASP internally buffers all the output,
my first (bad) guess was to put a kind of wrapper on the $Response->{Buffer}
object in Script_OnEnd in global.asa, which failed. So I guess there should
be a better way...

Anybody has some pointers?

Ime








Reply via email to