[squid-users] Vary object loop returns

Heiler Bemerguy heiler.bemerguy at cinbesa.com.br
Wed Jun 8 16:02:13 UTC 2016


Hum.. Amos, that store_miss would just make the object with that Vary 
header to not be cached, right?

I've just tested it. But I think we need to choose what types of Vary 
are valid/usable or not.

Reading the source code since yesterday, I made a patch that seems to 
fix my vary loop problem and will increase HITs a lot.

It will only accept "accept-encoding" as a Vary statement and ignore all 
the other garbage servers are using as "Vary"...

A simple change on http.cc, not client_side.cc


Here it goes, use at your own risk:

*--- http.cc     2016-05-08 09:46:35.000000000 -0300**
**+++ http.cc.new 2016-06-08 12:25:16.000000000 -0300**
**@@ -595,6 +595,11 @@**
**         xstrncpy(name, item, ilen + 1);**
**         Tolower(name);**
****
**+        if (strcmp(name, "accept-encoding") != 0)  {**
**+           safe_free(name);**
**+            continue;**
**+       }**
**+**
**         if (strcmp(name, "*") == 0) {**
**             /* Can not handle "Vary: *" withtout ETag support */**
**             safe_free(name);*


Save this text as http.patch on "src" directory and then: patch < http.patch


-- 
Best Regards,

Heiler Bemerguy
Network Manager - CINBESA
55 91 98151-4894/3184-1751



Em 08/06/2016 10:34, Heiler Bemerguy escreveu:
>
> So.. with store_miss I could make squid store only some types of vary?
> Wouldn't it "fix" the vary loop "bug" without messing with sources?
>
>
> -- 
> Best Regards,
>
> Heiler Bemerguy
> Network Manager - CINBESA
> 55 91 98151-4894/3184-1751
>
>
> Em 08/06/2016 03:31, Amos Jeffries escreveu:
>>
>>> 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
>>
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160608/9d5a826d/attachment.html>


More information about the squid-users mailing list