Democritus_Per1
Jul 12, 2012Nimbostratus
hash persistence on an irule manipulating ICAP headers
Hello all,
I have a Virtual server managing ICAP traffic and I need to set up hash persistence profile using an irule that it would examine the ICAP header .
I found some references that the plain HTTP request handling in irules can also handle ICAP requests , so I wonder is this indeed the case ?
irule proposed
--------------------
rule VO_persist_irule {
when HTTP_REQUEST { persist hash [HTTP::header X-SESSION_ID] }
}
ICAP request send to the VS
------------------
RESPMOD icap://10.11.1.20:1344/df ICAP/1.0
Allow: 204
Host: 10.11.1.20
X-SESSION_ID: 10.20.44.245:1340175464
Preview:64
Encapsulated: req-hdr=0, res-hdr=922, res-body=1297
GET http://o-o.preferred.oteglobe-ath1.v17.lscache7.c.youtube.com/videoplayback?id=e79e4c664668a8b5&itag=22&source=youtube&uaopt=no-save&upn=1ndeeUZUw9c&el=related&client=ytapi-apple-iphone&devKey=AdW2Kh1KB1Jkhso4mAT4nHgO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata&ip=0.0.0.0&ipbits=0&expire=1340205026&sparams=id,itag,source,uaopt,upn,ip,ipbits,expire&signature=3A6F6EE214D5863B816C3F72F106D4CA3EEFA2CD.4157E77D898CA2BEB684C2C1A1C129D41DA77D31&key=yta1&ms=au&mt=1340176212&cms_redirect=yes HTTP/1.1
Host: o-o.preferred.oteglobe-ath1.v17.lscache7.c.youtube.com
User-Agent: AppleCoreMedia/1.0.0.9B206 (iPhone; U; CPU OS 5_1_1 like Mac OS X; en_us)
Accept: */*
Range: bytes=0-1
Accept-Encoding: identity
X-Playback-Session-Id: 49DDB675-70DE-4EEA-A01D-E0B891DD4509
Cookie: PREF=f1=50000000&fms2=10000&fms1=210000;VISITOR_INFO1_LIVE=rOudgJlgDno;network-access-type=GPRS;Bearer-Type=w-TCP
WAP-Connection: Stack-Type=HTTP
HTTP/1.1 206 Partial Content
Last-Modified: Thu, 19 Jan 2012 10:12:32 GMT
Content-Type: video/mp4
Date: Wed, 20 Jun 2012 07:13:39 GMT
Expires: Wed, 20 Jun 2012 15:05:26 GMT
Cache-Control: public, max-age=28307
Content-Range: bytes 0-1/76737203
Accept-Ranges: bytes
Content-Length: 2
X-User-Agent-Options: no-save
X-Content-Type-Options: nosniff
Server: gvs 1.0
2
..
0; ieof
Thanks in advence