Hi,

As per the docs:

*       Your name

Simon Proctor

*       your email address

[EMAIL PROTECTED]

*       your homepage if you have one

www.simonproctor.com

* your preferred user-ID on CPAN. It must be between 4 and 9
characters long, all uppercase, letters 

s-proctor (9 chars)

* a short description of what you're planning to contribute

I have written a module tentatively called Apache::Precompress.

In a nutshell you precompress your files with gzip and it spits
them out, decompressing them only if the client doesn't support
gzip encoding or you have called it via SSI. An example SSI
conf being:

<FilesMatch "\.html$">
        Options +Includes
        PerlSetVar  SSI  1
</FilesMatch>

Showing the var test (I'm working on a way around that). Or
for ordinary content:

<Directory "docroot/compressedfilesfolder">
        Options -Includes
        SetHandler perl-script
        PerlHandler Apache::Precompress
</Directory>

This module can sit in a Filter chain to allow for compressed
content that is then parsed for SSI and where those SSI templates
are a combination of compressed and uncompressed pages.

ie:

        PerlModule Apache::Filter
        PerlModule Apache::Precompress
        PerlModule Apache::SSI
        <FilesMatch "\.html$">  # or whatever
                SetHandler perl-script
                PerlSetVar Filter On
                PerlSetVar  SSI  1
                PerlHandler Apache::Precompress Apache::SSI
        </FilesMatch>

Note, this is different to Compress and Dynagzip in that the content
is already compressed and not done on the fly as with those modules.

The rationale behind this is that if your disk space is low or
your find yourself spending too long archiving files and taking up
CPU then you can save both by compressing first.

Requires 

Compress::Zlib
Apache::Constants

For the SSI you also need

Apache::Filter
Apache::SSI

Reply via email to