perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Greg <>
Subject Gzip compression for dynamically generated content
Date Fri, 26 Nov 2004 17:48:04 GMT

I've been looking into using gzip to compress the output from our 
mod_perl servers. After a bit of research, I decided to use 
Apache::Dynagzip. My configuration is as follows:

<Directory "/www/cgi-bin">
         SetHandler perl-script
         PerlHandler Apache::RegistryFilter Apache::Dynagzip
         PerlSetVar Filter On
         PerlSetVar LightCompression On
         PerlSendHeader Off
         PerlSetupEnv On
         AllowOverride AuthConfig
         Options +ExecCGI

This works great, but the only problem is that I'm seeing the 
Content-Type header duplicated at the beginning of the HTTP response, 
like so:

[root@devel root]# (echo "GET / HTTP/1.1"; echo "Host:"; echo) | nc 80
HTTP/1.1 200 OK
Date: Fri, 26 Nov 2004 17:44:04 GMT
Server: Apache
X-Module-Sender: Apache::Dynagzip
Expires: Friday, 26-November-2004 17:49:06 GMT
Transfer-Encoding: chunked
Connection: close
Content-Type: text/html

Content-type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="" xml:lang="en" lang="en">

We're already printing the Content-Type from our application, so I'm not 
sure why it's being sent by Dynagzip as well.

Can anyone shed any light on this, or suggest an alternative way to 
dynamically compress the output from mod_perl?


-- Alex

Report problems:
Mail list info:
List etiquette:

View raw message