Loading ...
Sorry, an error occurred while loading the content.
 

Re: Gzip compression for dynamically generated content

Expand Messages
  • Slava Bizyayev
    Sorry Alex, I hit a wrong button in my previous response. It looks like your script is a CGI script that sends own CGI Content-Type. In order to use
    Message 1 of 3 , Nov 26, 2004
      Sorry Alex, I hit a wrong button in my previous response.

      It looks like your script is a CGI script that sends own CGI
      Content-Type. In order to use Apache::Filter chain you need to make your
      script Apache::Filter compatible. It might be as simple as to comment
      the print of Content-Type in your script, or might be much more
      complicated if you generate some other headers as well... Alternatively,
      you can configure Apache::Dynagzip to serve your script as a CGI
      application (with no Apache::Filter involved). It should be in Dynagzip
      documentation provided with the module in distribution.

      Hope this helps,
      Slava

      On Fri, 2004-11-26 at 11:48, Alex Greg wrote:
      > Hi,
      >
      >
      > 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
      > </Directory>
      >
      >
      > 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:
      > www.digitallook.com"; echo) | nc 192.168.100.3 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
      >
      > 200a
      > Content-type: text/html
      > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      > <head>
      > .....
      >
      >
      > 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?
      >
      >
      > Regards,
      >
      >
      > -- Alex


      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.