Sharing info from eCAP adapter with other adapters
Hi
I have an env with Squid 4 with several ICAPs.
In this env, I set in squid.conf the following:
adaptation_
and I add an ICAP header X-My-Header with some data in one ICAP and next ICAPs can use it (I also see it in tcpdump output).
Now I'm writing an eCAP and I did the following (for testing):
static const libecap::Name myHeader(
const libecap::Area Adapter:
{
if (name == myHeader) {
std::string t = "popo";
return libecap:
}
return libecap::Area();
}
void Adapter:
{
std::string t = "popo";
visitor.
}
It is much like the clamAV eCAP example.
What I see in tcpdump output is the following:
X.....qZREQMOD icap://
Host: my.proxy:1234
Date: Wed, 14 Jul 2021 20:37:33 GMT
X-My-Header: .
Encapsulated: req-hdr=0, null-body=427
Preview: 0
Allow: 204
Meaning, it indeed added the X-My-Header as ICAP header for the benefit of the ICAP server on the chain but it seems the value is just a dot. When I had to pass the data in X-My-Header from an ICAP server with ICAP header everything worked fine.
What am I doing wrong?
Thanks,
Moti
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- eCAP Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Moti Berger for more information if necessary.