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.

-----Mensaje original-----
De: squid-users [mailto:squid-users-boun...@lists.squid-cache.org] En nombre de 
EXT Amos Jeffries
Enviado el: lunes, 29 de febrero de 2016 12:47
Para: squid-users@lists.squid-cache.org
Asunto: Re: [squid-users] Squid proxy return gzip responses when I don't 
include Accept-Encoding

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
_______________________________________________
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users
_______________________________________________
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users

Reply via email to