Apache-Dynagzip
view release on metacpan or search on metacpan
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 HTTP/1.1 200 OK
C05 <-- S06 Date: Sun, 11 Aug 2002 21:28:43 GMT
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Expires: Sunday, 11-August-2002 21:33:43 GMT
C05 <-- S06 Vary: Accept-Encoding,*
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 11311 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
1c78 (hex) = 7288 (dec)
f94 (hex) = 3988 (dec)
0 (hex) = 0 (dec)
== Latency = 0.160 seconds, Extra Delay = 0.170 seconds
== Restored Body was 47510 bytes ==
=item *
Simple form
C<Vary: Accept-Encoding>
is provided as a default for the gzipped content.
=back
=head1 CUSTOMIZATION
C<Apache::Dynagzip> can be used in order
=over 4
=item *
to compress dynamic web content generated in C<Apache::Filter> chain;
=item *
to compress the output of CGI-compatible binary program;
=item *
to stream huge static files providing on the fly compression of the stream.
=back
These are the main regims, wich one can implement through the appropriate configuration of the handler.
Every main regim can be tuned with some specific settings and
can be accomplished with various control features.
All these specific settings and control features could be addressed through
additional configuration parameters unless provided defaults are sufficient.
=over 4
=item Note:
Do your best in order to avoid the implementation of this handler in internally redirected requests.
It does not help much in this case. Read your C<error_log> carefully in order to find appropriate
warnings. Tune your C<httpd.conf> carefully in order to take the most from opportunities offered
by this handler.
Always use accomplishing C<Apache::CompressClientFixup> handler in order to avoid C<gzip> compression
for known buggy web clients.
=back
=head2 Apache::Filter Chain
If your application is initially configured something like
PerlModule HTML::Mason::ApacheHandler
<Directory /path/to/subdirectory>
<FilesMatch "\.html$">
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</FilesMatch>
</Directory>
you might want just to replace it with the following:
PerlModule HTML::Mason::ApacheHandler
PerlModule Apache::Dynagzip
PerlModule Apache::CompressClientFixup
<Directory /path/to/subdirectory>
<FilesMatch "\.html$">
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler Apache::Dynagzip
PerlSetVar Filter On
PerlFixupHandler Apache::CompressClientFixup
PerlSetVar LightCompression On
</FilesMatch>
</Directory>
in order to provide C<gzip> compression of your content. You should be all set safely after that.
In more common cases you need to replace the line
PerlHandler HTML::Mason::ApacheHandler
in your initial configuration file with the set of the following lines:
PerlHandler HTML::Mason::ApacheHandler Apache::Dynagzip
PerlSetVar Filter On
PerlFixupHandler Apache::CompressClientFixup
You might want to add optionally
PerlSetVar LightCompression On
to reduce the size of the stream even for clients incapable to speak C<gzip>
(like I<Microsoft Internet Explorer> over HTTP/1.0).
Finally, make sure you have somewhere declared
PerlModule Apache::Dynagzip
PerlModule Apache::CompressClientFixup
( run in 2.114 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )