moria.org.uk

Sun, 27 Mar 2005

Finally, gzip-encoding works

I've been trying to fix gzip-transfer-encoding on moria.org.uk. mod_negotiation was refusing to offer a .gz as an alternative to an uncompressed file. After trying a lot of different arrangements, I spotted that even when it served a .gz, it did not return the underlying content's MIME type; it seemed to be ignoring the AddEncoding for .gz. Finally, I stopped messing around and read the source code. It seems that apache simply looks up each component of a filename against its list of extensions, and that it checks MIME types before it checks encodings. Remove .gz from /etc/mime.types and everything starts working. Always read the source!

[09:41] | [/computers/code] | #

Colin Phipps.
Archives
January 2007
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
Web Sites
zsync
PrBoom
About Kye
Credits
Blosxom
Powered by
Blogs that link here
[Valid Atom]