in reply to Re: Compressed content module
in thread Compressed content module

Thanks for the feedback, I'll be updating the code and update the root node. One question though. You mentioned letting the user define the extensions however it does this straight out of the box:
<FilesMatch "\.chtml$"> SetHandler perl-script PerlHandler Apache::Precompress </FilesMatch>
Is this something along the lines of what you meant (I kinda like the chtml extension :) )? If not could you give me an example?

Thanks once again, SP

Replies are listed 'Best First'.
Re**3: Compressed content module
by belg4mit (Prior) on Dec 01, 2002 at 23:11 UTC
    Doh! I forgot about File and friends. That is one way for the user to do so, and a good one too. I'd actually slightly mangled the module logic in my head there (the test for gz suffix). I'd recommend giving an example of that in the documentation (BTW MS uses CHTML for compiled HTML, there's also cHTML - compact HTML). Also, you might want to remove the test for gz extension and look for magic a la file(1). It's more UN*Xy, even if it is more expensive.

    --
    I'm not belgian but I play one on TV.

      GZip magic is easy - The first two bytes are "\x1f\x8b". You can also check for compress which I recall is "\x1f\x9b" though you may want to check.

      __SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
        'easy ' ne 'cheap'. It is certainly easy (thanks for the magic), but it's more expensive than doing an rindex on the filename.

        --
        I'm not belgian but I play one on TV.