Hi
I want to write my own ICAP server, but all the sample code I've found is failing, the majority with this error from squidclient:
And this error when accessed through Squid itself:
ICAP protocol error.
The system returned: [No Error]
This means that some aspect of the ICAP communication failed.
The system returned: [No Error]
This means that some aspect of the ICAP communication failed.
I've got this in my squid.conf:
# Enable ICAP for request and response modification
icap_enable on
icap_service service_req reqmod_precache icap://192.168.0.7:1344/request_mod
icap_service service_resp respmod_precache icap://192.168.0.7:1344/response_mod
# ICAP adaptation rules
adaptation_access service_req allow all
adaptation_access service_resp allow all
icap_enable on
icap_service service_req reqmod_precache icap://192.168.0.7:1344/request_mod
icap_service service_resp respmod_precache icap://192.168.0.7:1344/response_mod
# ICAP adaptation rules
adaptation_access service_req allow all
adaptation_access service_resp allow all
And I've tried running both Python and Ruby servers taken from various places. A lot are logging that they've received and replied to requests:
The servers are all listening, I've checked that:
$ ss -antp | grep 1344
LISTEN 0 4096 0.0.0.0:1344 0.0.0.0:* users:(("ruby",pid=563029,fd=5))
LISTEN 0 4096 0.0.0.0:1344 0.0.0.0:* users:(("ruby",pid=563029,fd=5))
The closest I've got is this one:
It seems to be working as it sees the headers and says it has returned data:
Received request: REQMOD icap://192.168.0.7:1344/request_mod ICAP/1.0
Original Headers:
Host: 192.168.0.7:1344
Date: Fri, 07 Feb 2025 10:10:30 GMT
Encapsulated: req-hdr=0, null-body=91
Preview: 0
Allow: 204, trailers
Modified request sent back
Original Headers:
Host: 192.168.0.7:1344
Date: Fri, 07 Feb 2025 10:10:30 GMT
Encapsulated: req-hdr=0, null-body=91
Preview: 0
Allow: 204, trailers
Modified request sent back
But I still get errors.
What could be wrong?
Does someone have some example server code they know works that I can test to help debug it?
Robin
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx https://lists.squid-cache.org/listinfo/squid-users