[PATCH] httpd: add option to send files using gzip content-encoding if available
Peter Korsgaard
jacmet at uclibc.org
Sat Jul 24 08:04:34 UTC 2010
>>>>> "beebee" == beebee <beebee at piments.com> writes:
Hi,
beebee> You should probably be careful not to confuse content-encodeing
beebee> and transmission-encoding.
beebee> You will find much of this covered here:
beebee> http://redmine.lighttpd.net/issues/2221
I had a look around, and it seems like most servers send
Content-Encoding, and that's what most browsers expect:
http://jython.xhaus.com/http-compression-in-python-and-jython/#encoding
http://mail-archives.apache.org/mod_mbox/tomcat-dev/200109.mbox/%3CB7B9EFC5.2D40%25pier@betaversion.org%3E
Lighttpd's mod_compress also uses Content-Encoding:
http://redmine.lighttpd.net/projects/lighttpd/repository/entry/trunk/src/mod_compress.c
beebee> The lighttpd strategy of keeping a cache of compressed files is
beebee> interesting. In any case if there is support for sending gz
beebee> compressed "if a pre-compressed file is available" it seems odd
beebee> not to do the compression is if needed.
While we could certainly do something like that, I don't we really need
to. Busybox's goal is cleary to keep things as simple as possible, and
doing a simple
for i in `find /var/www -name \*.html' -o -name '*.css' -o -name '*.js'`;
do
gzip -c -9 < $i > $i.gz
done
Would work for most people.
--
Bye, Peter Korsgaard
More information about the busybox
mailing list