Welcome! Log In Create A New Profile

Advanced

Re: Problem with cache key

Francis Daly
October 24, 2016 01:04PM
On Wed, Oct 19, 2016 at 06:05:54AM -0400, CarstenK. wrote:

Hi there,

> I took a look at the header nginx response.

> Vary: Accept-Encoding

> Vary: Accept-Encoding

So they both vary based on Accept-Encoding.

When I do a quick test of my versions of curl, Chrome, and Firefox,
I see no Accept-Encoding header for curl, "gzip, deflate, sdch, br"
for Chrome, and "gzip, deflate" for Firefox.

Those are three different values, and upstream presumably says that the
response depends on the value, so the cached version for one should not
be returned in response to another.

> How can i have a look for the headers of upstream servers?

From nginx to upstream - you could check the nginx debug log (I think),
or the upstream log, or possibly "tcpdump" the traffic to see what
exactly is happening.

In this case, it is probably the client request to nginx that is showing
the different headers. For that, you could check the nginx debug log,
or "tcpdump" that traffic.


There is a now-parallel thread at
https://forum.nginx.org/read.php?2,270496,270510 which shows a way to
"normalise" the Accept-Encoding headers that are sent to upstream. That
would be at the cost of (e.g.) not being able to serve sdch- or br-encoded
content to the Chrome that asked for it.

Cheers,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with cache key

CarstenK. October 17, 2016 09:50AM

Re: Problem with cache key

Francis Daly October 18, 2016 03:14PM

Re: Problem with cache key

CarstenK. October 19, 2016 06:05AM

Re: Problem with cache key

Francis Daly October 24, 2016 01:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 175
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready