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

Amos Jeffries squid3 at treenet.co.nz
Mon Feb 29 11:47:04 UTC 2016


On 1/03/2016 12:08 a.m., Bermejo Gil, Alberto (EXT - ES) wrote:
> Hi,
> 
> In the squid proxy (3.3.3), if the first request is with the
> Accept-Encoding: gzip header then all the next responses will also be
> in gzip, whether I request with a specific Accept-Encoding or not.
> 

What you describe is the behaviour that will happen if the server
responds with gzip and no Vary header.

That may be intentional on behalf of the server. There are some that try
to force 'efficiency' (aka bandwidth saving at any cost) by simply
returning gzip.


> I need something special in the squid.conf?
> 
> This is a rule for my domain:
> 
> refresh_pattern ^http://myip.com 60 100% 60 override-expire
> override-lastmod reload-into-ims ignore-reload ignore-no-cache
> ignore-private ignore-auth
> 

Your pattern does not help. It forces Squid to cache the objects for a
minimum of 1 hour regardless of anything that might be used to correct
change or update the cached version (ie locating anything other than the
gzip one stored).

With these above settings the Vary header alone will be able to prevent
cache oddities like you are seeing.

Amos


More information about the squid-users mailing list