[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:49:48 UTC 2015

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 onicap_send_client_ip onicap_send_client_username onicap_client_username_header X-Client-Username
icap_service service_a_resp respmod_precache bypass=on routing=on icap:// icap_service service_b_resp respmod_precache bypass=on routing=on icap://
adaptation_service_chain response_chain service_a_resp service_b_respadaptation_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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20151201/7ca51f3f/attachment-0001.html>

More information about the squid-users mailing list