;--------------START ICAP Best Practices NO-SCAN CPL as of 2FEB15 ;ICAP Best Practices CPL is designed to be placed in local policy ;which, by default, is evaluated after other policy files (such as VPM). ;This CPL assumes there is a preceeding "response.icap_service(icap_service_name)" ;rule, already parsed in a prior policy file. The following ;policy negates the "response.icap_service" rule, based on the following conditions delete_on_abandonment(yes) request.header.User-Agent="ProxyAV" response.icap_feedback.interactive(no) condition=NOICAP condition=http_https_scheme response.icap_service(no) define condition http_https_scheme url.scheme=http url.scheme=https end condition http_https_scheme define condition MisBehaving_Old_UserAgents request.header.User-Agent="Winamp" request.header.User-Agent="NSPlayer" request.header.User-Agent="RMA" request.header.User-Agent="ultravox" request.header.User-Agent="itunes" request.header.User-Agent="forest" request.header.User-Agent="Scottrader" request.header.User-Agent="SVN" end condition MisBehaving_Old_UserAgents define condition HTTPv0.9_UserAgents http.response.version=0.9 condition=MisBehaving_Old_UserAgents end condition HTTPv0.9_UserAgents define condition NO_or_LARGE_CONTENT_LENGTH ;note- the following line is correct- do NOT add .* between quotes response.header.Content-Length=!"" ;true if Content-Length header is not present response.header.Content-Length=!"^[0-9]{1,8}$" ;>99,999,999 end condition NO_or_LARGE_CONTENT_LENGTH define condition Bad_response_for_ICAP condition=NO_or_LARGE_CONTENT_LENGTH condition=HTTPv0.9_UserAgents condition=MEDIA_MIME_TYPES url.domain=//streamerapi.finance.yahoo.com ; ; Yahoos stock ticker problem -15sep06 url.domain=//streamerapi.finance.yahoo.com url.domain=//stream.aol.com url.domain=//finance.google.com ; Other streaming media exceptions url.domain=//youtube.com url.domain=//pandora.com end condition Bad_response_for_ICAP define condition MEDIA_MIME_TYPES response.header.Content-Type="video/" response.header.Content-Type="application/streamingmedia" response.header.Content-Type="application/x-streamingmedia" response.header.Content-Type="application/vnd.rn" response.header.Content-Type="application/ogg" response.header.Content-Type="application/x-ogg" response.header.Content-Type="audio/" response.header.Content-Type="multipart/x-mixed-replace" end condition MEDIA_MIME_TYPES define condition Not_ICAP_response ;note- the following line is correct- do NOT add .* between quotes response.x_header.X-Virus-ID=!"" ;true if X-Virus-ID header is not present end condition Not_ICAP_response define condition NOICAP ;Negate ICAP service only if the OCS response is undesirable condition=Bad_response_for_ICAP condition=Not_ICAP_response end condition NOICAP ;--------------END ICAP Best Practices NO-SCAN CPL