Welcome! Log In Create A New Profile

Advanced

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

September 15, 2009 01:22AM
On Tue, Sep 15, 2009 at 01:07:50PM +0900, Zev Blut wrote:

> Hello,
>
> Nginx 0.6.34 and above have changed the gzip_vary directive to add
> the "Vary: Accept-Encoding" header to uncompressed responses as well as
> compressed responses.
>
> The change is specifically:
>
> "
> Changes with nginx 0.6.34 27 Nov 2008
>
> *) Change: now the "gzip_vary" directive turned on issues a
> "Vary: Accept-Encoding" header line for uncompressed responses too.
> "
>
> Unfortunately for me, this change prevents us from using our CDN.
> Our CDN will not cache requests for non gzipped content that has the
> Vary header. Thus, this defeats the purpose of our CDN for a large part
> of our image and audio content.
>
> For the time being, this means I have to remove the changes to the
> nginx_http_gzip_static_module.c to prevent this header from showing up.
>
> Short of hacking nginx_http_gzip_static_module.c, is there a way to prevent
> this Vary header from showing up with non-gzipped content? If not, would it
> be possible to make this directive configurable?

"gzip_vary on" adds the "Vary" header only to non-gzipped responses those
can be gzipped, but were not gzipped for some reasons: gzip_disable,
gzip_proxied, and gzip_http_version disable gzipping for some particular
reason.

Since image and audio content are not gzipable content at all, nginx will
not add this header in those responses.

> Also may I ask why this change was made? Is there something I am
> missing relating to the HTTP spec for this?

The modern Squid versions keep several responses: gzipped and non-gzipped
ones and use appropriate one depending on "Accept-Encoding" header.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Zev Blut September 15, 2009 12:16AM

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Jeff Waugh September 15, 2009 12:54AM

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Zev Blut September 15, 2009 01:44AM

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 01:52AM

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Zev Blut September 15, 2009 08:46AM

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Zev Blut September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Zev Blut September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 08:46AM

Re: [BULK] Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Zev Blut September 15, 2009 08:52AM

Re: Ways to control the gzip_vary directive from nginx 0.6.34 and above?

Igor Sysoev September 15, 2009 01:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready