nginx gzip doesn't (always) respect Accept-Encoding header?
lists at wildgooses.com
Wed Jun 1 01:19:54 MSD 2011
Hi, I seem to be missing an obvious step to control nginx gzip based (only) on the clients Accept-Encoding header?
Nginx 0.8.53. My config is:
gzip_buffers 16 8k;
# how to gzip proxied content
Using Firefox (use about:config) I change my Accept-Encoding header to be blank and now Firefox show me a page of unprintable characters (gzipped content is still sent but apparently not decoded by Firefox)
I delete the "gzip_proxied any" directive - this time my Accept-Header choice is respected and content is not gzipped (and readable). Resetting my Accept-Header back to default and once again content is gzip'ed (and readable)
So, it would appear that the directive gzip_proxied, also controls whether nginx respects the Accept-Encoding header? This seems unexpected (and undesirable)? My goal would be to compress all content purely based on the Accept-Header and disregard and Via headers (if the proxy is dim enough to request gzipped content and can't handle it, then it's there problem)
Is this behaviour expected? Changed in some later release?
More information about the nginx