<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <p>Hi Eliezer<br>
    </p>
    <p>I've never used ICAP, and I think hacking the code is way faster
      than creating/using a separate service for that. And I'm not sure,
      but I don't think I can manage to get this done with current
      squid's options.</p>
    <p><font color="#000099">This patch will make squid NOT ignore the
        objects with "<b>Vary: *</b>" replies. It will consider them a
        valid and cacheable object. <br>
        And it will only consider as a valid Vary option those who <b>begins
        </b>with"accept" or the "user-agent" one.</font><br>
    </p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Best Regards,

Heiler Bemerguy
Network Manager - CINBESA
55 91 98151-4894/3184-1751</pre>
    <p></p>
    <div class="moz-cite-prefix">Em 21/10/2016 16:07, Eliezer Croitoru
      escreveu:<br>
    </div>
    <blockquote cite="mid:053a01d22bce$67f6f1a0$37e4d4e0$@ngtech.co.il"
      type="cite">
      <pre wrap="">Instead of modifying the code, would you consider to use an ICAP service
that will mangle this?
I am unsure about the risks about doing so but why patch the sources if you
can resolve it with the current mainstream capabilities and API?

Eliezer

----
Eliezer Croitoru <a class="moz-txt-link-rfc2396E" href="http://ngtech.co.il/lmgtfy/"><http://ngtech.co.il/lmgtfy/></a> 
Linux System Administrator
Mobile: +972-5-28704261
Email: <a class="moz-txt-link-abbreviated" href="mailto:eliezer@ngtech.co.il">eliezer@ngtech.co.il</a>
 

From: squid-users [<a class="moz-txt-link-freetext" href="mailto:squid-users-bounces@lists.squid-cache.org">mailto:squid-users-bounces@lists.squid-cache.org</a>] On
Behalf Of Heiler Bemerguy
Sent: Friday, October 21, 2016 18:21
To: <a class="moz-txt-link-abbreviated" href="mailto:squid-users@squid-cache.org">squid-users@squid-cache.org</a>
Subject: Re: [squid-users] Caching http google deb files


Hello,
I've limited the "vary" usage and gained some hits by making these
modifications (in blue) to the http.cc code:
    while (strListGetItem(&vary, ',', &item, &ilen, &pos)) {
        SBuf name(item, ilen);
        if (name == asterisk) {
        /*  vstr.clear();            
            break; */ 
            continue;
        }
        name.toLower();

       if (name.cmp("accept", 6) != 0 &&
          name.cmp("user-agent", 10) != 0)
               continue;

        if (!vstr.isEmpty())
            vstr.append(", ", 2);



</pre>
    </blockquote>
    <br>
  </body>
</html>