[squid-users] Vary object loop returns

Amos Jeffries squid3 at treenet.co.nz
Wed Jun 8 06:31:29 UTC 2016


On 8/06/2016 10:27 a.m., Heiler Bemerguy wrote:
> 
> I changed the source to debug a bit, started a fresh/clean squid.
> 
> accessed http://api.footballaddicts.com/favicon.ico
> 
> and look what it's trying to compare():
> 
> vary =
> 'accept="text%2Fhtml,application%2Fxhtml+xml,application%2Fxml%3Bq%3D0.9,*%2F*%3Bq%3D0.8",
> if-none-match="%225756ad27-47e%22",
> if-modified-since="Tue,%2007%20Jun%202016%2011%3A16%3A55%20GMT",
> accept-language="en-US,en%3Bq%3D0.8,pt-BR%3Bq%3D0.5,pt%3Bq%3D0.3",
> accept-encoding="none", x-client-locale,
> user-agent="Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20WOW64%3B%20rv%3A46.0)%20Gecko%2F20100101%20Firefox%2F46.0",
> x-device'
> 

AIUI, the above is the sub-key it generated for the active client
request based on the vary-marker object that was found by looking up the
request URL.

When looking up the above sub-key (not the URL) it found an object
stored with the below different sub-key. Which according to Vary
algorithm rules means the found one is not the same one being wanted.

I am thinking that collapsed_forwarding and SMP aspects of this are just
that the worker handling a request its some other URLs stored object on
the sub-key lookup.

> entry->mem_obj->vary_headers =
> 'accept="text%2Fhtml,application%2Fxhtml+xml,application%2Fxml%3Bq%3D0.9,*%2F*%3Bq%3D0.8",
> if-none-match, if-modified-since,
> accept-language="en-US,en%3Bq%3D0.8,pt-BR%3Bq%3D0.5,pt%3Bq%3D0.3",
> accept-encoding="none", x-client-locale,
> user-agent="Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20WOW64%3B%20rv%3A46.0)%20Gecko%2F20100101%20Firefox%2F46.0",
> x-device'
> 
> That's why it always gives vary object loop
> 

:-( Stupidity at its best with that sites designer.


Heres a little recipe that should raise the HIT ratio for that kind of
crap in 3.5:

 acl brokenVaryHeaders rep_header Vary -i \
    user-agent \
    if(-none)?-match \
    if-(un)?modified-since

 store_miss deny brokenVaryHeaders


Amos



More information about the squid-users mailing list