Yes, you can do it.
Let's say your request has a custom header like X-MyCustom-Header:
RESPMOD icap://192.168.2.231:1344/RESPMOD ICAP/1.0
Encapsulated: req-hdr=0, res-hdr=90, res-body=109
GET http://192.168.2.100/634769037391920771/Filename.TXT HTTP/1.1
HTTP/1.1 200 OK
You can access and/or log the value of this header using the property:
You can use it directly like that in a log field or you can test the value in the rules and perform an action:
Header.ICAP.Request.Get ("X-MyCustom-Header") equals "ThisIsATest"
Does that help?
Yes, that's now sending the custom header to the log file as we required - thanks! Also, is it possible to add a header to the log file for this (where the other headers are #time_stamp "auth_user" src_ip status_code "req_line" etc)