X-Subscriber-Id

Asked by Kyle Brost

I have modified the adapter_modifying.cc file to include the following within Adapter::Xaction::start()

        libecap::Header::Value subscriberId = hostx->option(libecap::metaSubscriberId) ;

It comes back blank in requests which I suspect is correct. BUT It also comes blank in the response.

I have configured my squid.conf to include:

adaptation_masterx_shared_names X-Subscriber-ID

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Rousskov
Solved:
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

Squid's adaptation_masterx_shared_names is for sharing meta information among adaptation transactions. After one adapter sets X-Subscriber-ID, others should see it (for the same master transaction). Squid itself will not add anything (including X-Subscriber-ID) to the shared adaptation area.

Revision history for this message
Kyle Brost (kyle-brost) said :
#2

Okay, how do I set this value? Is it part of the Message Header or is in the Host Options. If it's the host option what code would I use?

Revision history for this message
Best Alex Rousskov (rousskov) said :
#3

It is a transaction option (an ICAP header equivalent). To quote squid.conf documentation for adaptation_masterx_shared_names:

        An eCAP REQMOD or RESPMOD transaction may set an entry in the
        shared table by implementing the libecap::visitEachOption() API
        to provide an option with a name specified in
        adaptation_masterx_shared_names.

For an example of visitEachOption() implementation, please see Adapter::Xaction::visitEachOption() in the eCAP ClamAV adapter. It sets the Virus-ID option.

Revision history for this message
Kyle Brost (kyle-brost) said :
#4

Thanks Alex Rousskov, that solved my question.