[squid-users] Vary object loop returns

Yuri Voinov yvoinov at gmail.com
Wed Jun 8 16:03:47 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
# Clean up Vary to increase caching
reply_header_access Vary deny all
reply_header_replace Vary Accept-Encoding

Hmmm? ;)


08.06.2016 22:02, Heiler Bemerguy пишет:
>
>
> 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
>
>
>
> _______________________________________________
> 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
 
iQEcBAEBCAAGBQJXWEHiAAoJENNXIZxhPexGsJkIAIwYPMIx8YBZjgusZvddQ6G+
NaGwcbVTrA+my2cgX6FpJLl5jHUF0Z/K8wiQbKAz73zmQSr0gkjSegKqCgqBf+mS
UrvdS/4Hg1dCSkdQVOkHeb6cRKOVI2VLiOOtMWDJdTeXjv/ELsn7PfIeOMujgGBm
3069k4mm+DwmQ4V/ozSOejBa7PB83UU80Ab6e5dnhiEpjnsN3MaZhMyCxyR8YMdK
4ikrmOaGkKLjoQEwcMGyVbkzKIOwe3eg5HCL/qr5v0Ickxn/adyHweL0KE8UjQXl
ghTKj2OpM4SWT9Tc8W0kZM8bpwzS5qgA/5rqJbDSbtjDFH03mH0R3eRjWtTVsik=
=5lo3
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160608/dca69796/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x613DEC46.asc
Type: application/pgp-keys
Size: 2437 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160608/dca69796/attachment-0001.key>


More information about the squid-users mailing list