Apache::PassFile - print a file to STDOUT
In the conf/access.conf file of your Apache installation add lines
<Files *.html> SetHandler perl-script PerlHandler Apache::OutputChain Apache::GzipChain Apache::PassFile </Files>
This handler implements nothing but a quite efficient cat(1) in perl. While it innocently prints to STDOUT it may well be the case that STDOUT has been tied, and that's the only reason why this module is needed. Once we can stack any apache modules on top of each other, this module becomes obsolete.
PassFile reads files from disk in chunks of size BUFFERSIZE. BUFFERSIZE is a global variable that can be set via the BUFFERSIZE method. The default value is 16384.
Per default the module sets the Last Modified header. It requires HTTP::Date in order to do so. You can suppress that by setting
Last Modified
PerlSetVar no_mtime true
(c) 1997 Jan Pazdziora, adelton@fi.muni.cz, at Faculty of Informatics, Masaryk University, Brno (small performance changes by Andreas Koenig)
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Apache::GzipChain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::GzipChain
CPAN shell
perl -MCPAN -e shell install Apache::GzipChain
For more information on module installation, please visit the detailed CPAN module installation guide.