[squid-users] Caching http google deb files

Eliezer Croitoru eliezer at ngtech.co.il
Sat Oct 22 21:55:01 UTC 2016


Well you are right about that but for me it’s simpler to Write and ICAP
service to do that then hack squid code.

Eliezer

----
Eliezer Croitoru <http://ngtech.co.il/lmgtfy/> 
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il
 

From: Heiler Bemerguy [mailto:heiler.bemerguy at cinbesa.com.br] 
Sent: Saturday, October 22, 2016 21:18
To: Eliezer Croitoru <eliezer at ngtech.co.il>
Cc: squid-users at squid-cache.org
Subject: Re: [squid-users] Caching http google deb files


Hi Eliezer
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.
This patch will make squid NOT ignore the objects with "Vary: *" replies.
It will consider them a valid and cacheable object. 
And it will only consider as a valid Vary option those who begins
with"accept" or the "user-agent" one.

-- 
Best Regards,

Heiler Bemerguy
Network Manager - CINBESA
55 91 98151-4894/3184-1751
Em 21/10/2016 16:07, Eliezer Croitoru escreveu:
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 <http://ngtech.co.il/lmgtfy/>
<http://ngtech.co.il/lmgtfy/>  
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il <mailto:eliezer at ngtech.co.il> 
 

From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On
Behalf Of Heiler Bemerguy
Sent: Friday, October 21, 2016 18:21
To: squid-users at squid-cache.org <mailto:squid-users at squid-cache.org> 
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);




-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 65809 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20161023/8607aab5/attachment-0001.bin>


More information about the squid-users mailing list