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

Bermejo Gil, Alberto (EXT - ES) alberto.bermejo_gil.ext at nokia.com
Tue Mar 1 10:34:22 UTC 2016


No, I don't want to gzip in all responses.

My problem is because I have to clients, one is waiting for a gzip response and the other for non-compress response. 

I like to cache two different responses one in gzip and other without it. (depending of the header). Because if I send the request with 
Accept-Encoding: gzip, the squid cache it and they respond the same if don't write Accept-Encoding.

-----Mensaje original-----
De: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] En nombre de EXT Yuri Voinov
Enviado el: lunes, 29 de febrero de 2016 17:43
Para: squid-users at lists.squid-cache.org
Asunto: Re: [squid-users] Squid proxy return gzip responses when I don't include Accept-Encoding


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
This:

http://wiki.squid-cache.org/ConfigExamples/ContentAdaptation/eCAP#Using_eCAP_for_GZip_support_with_Squid_3.x.2F4.x

can't help you?

29.02.16 21:25, Bermejo Gil, Alberto (EXT - ES) пишет:
> 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-bounces at lists.squid-cache.org] En
nombre de EXT Amos Jeffries
> Enviado el: lunes, 29 de febrero de 2016 12:47
> Para: squid-users at 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 at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
 
iQEcBAEBCAAGBQJW1HUhAAoJENNXIZxhPexGzeoH/3WQJ6I7UVDkZa5n91y0jwjj
ejtvFuAOL78rOH4ux7AreK/ExTwzUxv3Amh/U2MVqII5AuEqnpL5pXKBMWQ4XRVP
vtZKfols1R38FTl9FpH28Enwqty1s8yfG82TXbhPzM7bydC3YD//DlihzkoMcZE/
OYk/jd2l+ksbI/ENV9sXae0Wt9+/sJDCU3oaE4XXrE1jRUKSQ6yBS3Ez9vOiYhJI
Ovb6qIdBkwDBfQAJzDyM+UQu9shBYIuk9eQjXoX7AcR64VMzOPjOrqwx98qimp4l
tFqabIaKD03FXNjdGBuNCakTMjhbOejRJDOLouY7AAEqNPuOn+g9rQNOAen38lc=
=tu3V
-----END PGP SIGNATURE-----



More information about the squid-users mailing list