[MKDoc-modules] MKDoc::Apache_Cache always returns gzip encoded
content
Bruno Postle
bruno at webarchitects.co.uk
Thu Aug 26 16:22:17 BST 2004
If I fetch a document served by MKDoc::Apache_Cache it returns gzip
encoded content regardless of the 'Accept-Encoding' header:
ab -n1 -v4 -H 'Accept-Encoding: none' http://www.example.com/
ab -n1 -v4 -H 'Accept-Encoding: gzip' http://www.example.com/
This is because of a bogus comparision of the http status code which
is always going to fail.
This fixes it for me:
87,88c87
< lc $ENV{'HTTP_ACCEPT_ENCODING'} !~ /gzip/ and
< $ret =~ /\ncontent-encoding\: gzip/ and do {
---
> lc $ENV{'HTTP_ACCEPT_ENCODING'} !~ /gzip/ and do {
--
Bruno
More information about the MKDoc-modules
mailing list