[squid-users] Question about c-icap and setting X-Next-Services header to empty string

Giray Simsek giray_simsek at hotmail.com
Tue Dec 1 15:58:36 UTC 2015


Hi,

[Sorry for the dupe mail but I forgot to format the previous one as "Plain Text" and it looks bad.]

I have 2 icap response modification services. I have integrated them to squid as in the below config. 

I am trying to update the adaptation plan dynamically in the first service (service_a_resp)
Basically, if a certain condition is met, then I don't want the second service (service_b_resp) to be called by Squid.


icap_enable on
icap_send_client_ip on
icap_send_client_username on
icap_client_username_header X-Client-Username

icap_service service_a_resp respmod_precache bypass=on routing=on icap://127.0.0.1:1344/virus_scan 
icap_service service_b_resp respmod_precache bypass=on routing=on icap://127.0.0.1:1344/content_filter

adaptation_service_chain response_chain service_a_resp service_b_resp
adaptation_access response_chain allow all

After reading the documentation about the icap_service option and its routing parameter, I got the impression that I can achieve this by setting X-Next-Services header to empty string in my first service (service_a_resp) in the adaptation chain as below:

ci_headers_add(req->response_header, "X-Next-Services: ");

However, when I test this I see that the second service is still getting called by Squid.

How can I dynamically prevent the second service in the adaptation chain from getting called? Any ideas what I am missing?

Thanks,
Giray

________________________________
> From: giray_simsek at hotmail.com 
> To: squid-users at lists.squid-cache.org 
> Subject: Question about c-icap and setting X-Next-Services header to 
> empty string 
> Date: Tue, 1 Dec 2015 07:49:48 -0800 
> 
> Hi, 
> 
> I have 2 icap response modification services. I have integrated them to 
> squid as in the below config. 
> 
> I am trying to update the adaptation plan dynamically in the first 
> service (service_a_resp) 
> Basically, if a certain condition is met, then I don't want the second 
> service (service_b_resp) to be called by Squid. 
> 
> 
> icap_enable on 
> icap_send_client_ip on 
> icap_send_client_username on 
> icap_client_username_header X-Client-Username 
> 
> icap_service service_a_resp respmod_precache bypass=on routing=on 
> icap://127.0.0.1:1344/virus_scan 
> icap_service service_b_resp respmod_precache bypass=on routing=on 
> icap://127.0.0.1:1344/content_filter 
> 
> adaptation_service_chain response_chain service_a_resp service_b_resp 
> adaptation_access response_chain allow all 
> 
> After reading the documentation about the icap_service option and its 
> routing parameter, I got the impression that I can achieve this by 
> setting X-Next-Services header to empty string in my first service 
> (service_a_resp) in the adaptation chain as below: 
> 
> ci_headers_add(req->response_header, "X-Next-Services: "); 
> 
> However, when I test this I see that the second service is still 
> getting called by Squid. 
> 
> How can I dynamically prevent the second service in the adaptation 
> chain from getting called? Any ideas what I am missing? 
> 
> Thanks, 
> Giray 
 		 	   		  


More information about the squid-users mailing list