[squid-users] Question about c-icap and setting X-Next-Services header to empty string
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://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_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...
More information about the squid-users