Re: ICAP, bypassing respmod depending reqmod result

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Mon, 01 Dec 2008 20:22:06 +0200

Moshe Beeri wrote:
> Hi,
>
> I am trying to add extension to ICAP layer in squid 3.0 STABLE 10.
> Our service works both in respmod and reqmod, in some cases we know
> right after reqmod that the data should passed directly to the client.
> in those cases we like to be more efficient by not utilizing respmod at
> all, sending the server's response directly to the client, bypassing
> ICAP server's respmod.
>
> Does any one have an idea how to decided after 'reqmod reply'
> whether http server response will be sent to ICAP server's respmod or to
> send directly to client?
> Any suggestions how to trick the mechanism?

You can add a header to the http request during reqmod processing eg
"X-ICAP-Respmod-Needed: False" and play with a squid req_header acl to
allow/deny respmod processing:

acl AnXIcapHeader req_header X-ICAP-Respmod-Needed False
icap_access class_respmod deny AnXIcapHeader

Regards,
     Christos

>
> Thanks Allot,
> Moshe Beeri.
>
Received on Mon Dec 01 2008 - 18:22:23 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 12:00:03 MST