[squid-users] Squid proxy return gzip responses when I don't include Accept-Encoding

Amos Jeffries squid3 at treenet.co.nz
Tue Mar 1 01:12:30 UTC 2016


On 1/03/2016 4:25 a.m., Bermejo Gil, Alberto (EXT - ES) wrote:
> There are something that can I do in the server side in order to prevent this behavior?
> 
> I mean, I want to cache different responses, one with gzip and another without gzip.
> 

You can check what the server is responding with and ensure that it uses
Vary headers on all responses that have multiple payload variants like this.

The specs of what Vary coming from the server should be doing are at
<https://tools.ietf.org/html/rfc7231#section-7.1.4>. So long as the
server is providing that header correctly, Squid will be doing its part
with the caching like you want.

Amos



More information about the squid-users mailing list