Possible gzip_vary bug? (v1.5.1)

I’m running the latest development version of nginx and gzipping is
working.
But no Vary Accept-Encoding header is added to any gzip response. The
gzip_http_version isn’t affecting the behavior, no matter if I set it to
1.0
or 1.1 no header is sent. Even if I add the header myself via the
add_header
directive, nothing.

If I use PHP to add the header it’s there. Any ideas what the problem
could
be?

My configure options:
https://github.com/MovLib/www/blob/master/conf/install-scripts/nginx.sh
My configuration: https://github.com/MovLib/www/tree/master/conf/nginx
Specifically the gzip configuration:
https://github.com/MovLib/www/blob/master/conf/nginx/conf/gzip.conf

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240214,240214#msg-240214

Hello!

On Wed, Jun 19, 2013 at 08:52:14AM -0400, Fleshgrinder wrote:

https://github.com/MovLib/www/blob/master/conf/install-scripts/nginx.sh
My configuration: https://github.com/MovLib/www/tree/master/conf/nginx
Specifically the gzip configuration:
https://github.com/MovLib/www/blob/master/conf/nginx/conf/gzip.conf

Works fine here:

: GET / HTTP/1.1
: Host: foo
: Accept-Encoding: gzip
:
: HTTP/1.1 200 OK
: Server: nginx/1.5.2
: Date: Wed, 19 Jun 2013 13:23:39 GMT
: Content-Type: text/html
: Last-Modified: Mon, 27 Apr 2009 14:40:49 GMT
: Transfer-Encoding: chunked
: Connection: keep-alive
: Vary: Accept-Encoding
: Content-Encoding: gzip

Best guess that in your case gzipping happens not in nginx (in
php?), and add_header doesn’t work for you due to other add_header
directives used on more specific levels.

Alternatively, you might be testing with spdy, where gzip_vary
does nothing as all clients are required to support gzip.

If you still think there is a bug, you may want to provide a
simple configuration to reproduce the problem.


Maxim D.
http://nginx.org/en/donation.html

Many thanks Maxim, sometimes the solution is so easy. I was using SPDY
and
only checked with latest Firefox and Chrome. And one shouldn’t trust
Page
Speed, it keeps telling me about the vary headers, although it’s using
SPDY.
Again, many thanks.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,240214,240223#msg-240223