You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Shane <sh...@cm.nu> on 2006/02/20 20:30:52 UTC

[users@httpd] INFLATE filter and content decompression

Hello list,

I am attempting to migrate a server from apache 1.x to
2.0.55 and have hit a bit of a snag.  I'm using mod_gunzip
under 1.x which allows one to store gziped content and if
the browser supports gzip compression, the content gets
passed through.  Otherwise, it is decompressed.  The files
themselves are .html files and not .html.gz so I don't have
to adjust href links.  mod_gunzip figures out whether an
.html is gzipped or not based on the file header or so I
assume.

I am looking for a way to do this under Apache2 and am
wondering whether anyone has any ideas.  I have tried this:
<Files .html>
SetOutputFilter INFLATE
</Files>

But when I send a request without browser gzip support, I
get the gzip content regardless.  I have also tried this
from a blog post:
ExtFilterDefine gunzip intype="application/x-gzip"
outtype="text/plain" mode=output cmd="/bin/zcat -c -d"
<Files .html>
SetOutputFilter gunzip
</Files>

But I imagine this does the same thing as the inflate
filter and has the same result.  That is the content is
never decompressed.

Any assistance greatly appreciated,
Shane

-- 
http://www.cm.nu/~shane/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] INFLATE filter and content decompression

Posted by Shane <sh...@cm.nu>.
On Mon, Feb 20, 2006 at 08:21:47PM +0000, Nick Kew wrote:
> On Monday 20 February 2006 19:30, Shane wrote:
> Isn't that one of the examples on the mod_filter page?

Hmm, doesn't appear to be.  I am looking here:
http://httpd.apache.org/docs/2.0/filter.html

Though there are good examples for compressing output with
Deflate.  I did some further reading and it looks like
Inflate is only available as of 2.2.0 so that is probably
my problem.  Will look at backporting that.

S

-- 
http://www.cm.nu/~shane/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] INFLATE filter and content decompression

Posted by Nick Kew <ni...@webthing.com>.
On Monday 20 February 2006 19:30, Shane wrote:

> Any assistance greatly appreciated,

Isn't that one of the examples on the mod_filter page?

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: INFLATE filter and content decompression

Posted by Joost de Heer <sa...@xs4all.nl>.
> I am looking for a way to do this under Apache2 and am
> wondering whether anyone has any ideas.  I have tried this:
> <Files .html>
> SetOutputFilter INFLATE
> </Files>

<FilesMatch \.html> or <Files ~ *.html> perhaps?

And on the mod_deflate page there are some examples on how to disable gzip
compression, it shouldn't be too hard to reverse the logic, I think.

Joost


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org