[squid-users] Question about ICAP.

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Sat, 07 Jul 2012 06:57:45 +0300

i already asked before once.
i want to prioritize ICAP services by specific order like :
basicfiltering depth filtering

so i use: adaptation_service_chain ??
as far i understand it will make the checks by order.
and what if one of the ICAP services has deny acl for the url?
let say

#request: http://www.google.com/
acl google dstdomain .google.com
adaptation_service_chain urlFilter logger1 logger2
urlFilter allow all
logger1 deny google
logger1 allow all
logger2 allow all

?

another question is:
ICAP respmod_precache from squid has i have seen will send the request url.
and i'm not sure (i dont remember ICAP rfc) if the RESPMOD suppose to
send the request url as part of the protocol.
can i send in the RESPMOD the request url and by that change the url
that the content will be stored at?
in the Encapsulated header i am getting the request and the response.
in a REQMOD i am responding with:
Encapsulated: req-hdr=0, null-body="some_byte_number"
maybe i can response to a RESPMOD with header like:
Encapsulated: req-hdr=0, res-hdr=583, res-body=850

and to change the request header.. then on squid the cached url will be
the one from the ICAP server response and then there is no longer need
for "store_url_rewrite" at all because ICAP can replace url_rewrite and
store_url_rewrite..

Thanks,
Eliezer

this is a basic ICAP RESPMOD session sample to work with..:
RESPMOD icap://127.0.0.1:1344/respmod ICAP/1.0
Host: 127.0.0.1:1344
Date: Sat, 07 Jul 2012 03:42:40 GMT
Encapsulated: req-hdr=0, res-hdr=583, res-body=850
Preview: 0
Allow: 204

GET http://www.google.com/ HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101
Firefox/13.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie:
PREF=ID=3f1a1925884751e3:U=726510ee09cc5141:FF=0:LD=en:TM=1317970640:LM=1339099594:GM=1:S=VsYoiMXWKW5OPJaK;
NID=60=hSChbnc5ZvZSldPGywiQG9OkjCYFC9NNLXWHWg84bCsDeD1g7mvD3uN0nObnb17DnuWLeAi5nsmgHvqlbSvV_9qJuHUqbT0j9q1ydyCodwqCvxLrF-yd69ZzBHf5xxZyPyBn_0KkOxbbYH2YAGyJuEU;
OGPERM=W6%3D0.0.4.60

HTTP/1.1 302 Moved Temporarily
Location: http://www.google.co.il/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Date: Sat, 07 Jul 2012 03:43:44 GMT
Server: gws
Content-Length: 221
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN

0

ICAP/1.0 100 continue

dd
<HTML><HEAD><meta http-equiv="content-type"
content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.il/">here</A>.
</BODY></HTML>

0

ICAP/1.0 200 OK
ISTag: "GreasySpoon-1.0.8-01"
Host: 127.0.0.1:1344
Encapsulated: res-hdr=0, res-body=295
Connection: close

HTTP/1.1 302 Moved Temporarily
Location: http://www.google.co.il/
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: text/html; charset=UTF-8
Date: Sat, 07 Jul 2012 03:43:44 GMT
Server: gws
Content-Length: 221
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN

dd
<HTML><HEAD><meta http-equiv="content-type"
content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.il/">here</A>.
</BODY></HTML>

0

-- 
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il
Received on Sat Jul 07 2012 - 03:57:52 MDT

This archive was generated by hypermail 2.2.0 : Sat Jul 07 2012 - 12:00:01 MDT