<div dir="ltr">Hi<div><br></div><div>I have an env with Squid 4 with several ICAPs.</div><div>In this env, I set in squid.conf the following:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">adaptation_masterx_shared_names X-My-Header <br></blockquote><div><br></div><div>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).</div><div><br></div><div>Now I'm writing an eCAP and I did the following (for testing):</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">static const libecap::Name myHeader("X-My-Header", libecap::Name::NextId()); </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">const libecap::Area Adapter::Xaction::option(const libecap::Name &name) const  <br> {                                                                                                                            <br>     if (name == myHeader) {</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">        std::string t = "popo";   </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">        return libecap::Area(t.data(), t.size());<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">    } </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">     return libecap::Area();<br> }                                                                              <br>                           <br> void Adapter::Xaction::visitEachOption(libecap::NamedValueVisitor &visitor) const<br>{                                                                                                  <br>     std::string t = "popo";                                                                                                    <br>    visitor.visit(myHeader, libecap::Area(t.data(), t.size()));              </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">}   </blockquote><div><br></div><div> It is much like the clamAV eCAP example.</div><div>What I see in tcpdump output is the following:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">X.....qZREQMOD icap://my.proxy:1234/request ICAP/1.0<br>Host: my.proxy:1234<br>Date: Wed, 14 Jul 2021 20:37:33 GMT<br>X-My-Header: .<br>Encapsulated: req-hdr=0, null-body=427<br>Preview: 0<br>Allow: 204</blockquote><div><br></div><div>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.</div><div>What am I doing wrong?</div><div>BTW, I'm struggling to find a decent eCAP interface documentation. Can you please help me understand what is the difference between 'option' and 'visitEachOption' methods? </div><div><br></div><div>Thanks,</div><div>Moti <br></div></div>