[squid-users] Display eCAP meta-information on Squid error-page

chgerber christof.gerber1 at gmail.com
Fri Jun 22 09:14:23 UTC 2018

>> If it does not work, then most likely there is a bug in your adapter, in 
>> your Squid configuration, or in Squid. 

By now I see no other way than this being a misunderstanding between us or a
bug in Squid 3.5.

Squid 3.5 XactionRep.cc line 492:

// Store received meta headers for adapt::<last_h logformat code use.
Adaptation::History::Pointer ah = request->adaptLogHistory();
    if (ah != NULL) {
        HttpHeader meta(hoReply);
        OptionsExtractor extractor(meta);

This is where Squid demands the ecap meta headers. This succeeds as I follow
fromt the fact that I can log them with the adapt::<last_h logformat. The
comment also indicates the usage of these ecap meta headers with
adapt::<last_h logformat. But with %{my-ecap-header}note it does not work.
Even when I add %note which should log all notes according to the logformat
configuration docs the result is the same ("-"). I tested this in both
Respmode and Reqmode.  Why are you so sure that %note should work with ecap
meta headers?

Is it due to the changelog of Squid-3.4:
"New format code %note to log a transaction annotation linked to the
transaction by ICAP, eCAP, a helper, or the note squid.conf directive."

To elaborate again why this is important to me: I want to apply ACL's on
information provided by the eCAP adapter. As ACL's can be applied to notes
and because you mentioned that eCAP can provide ecap meta headers as notes I
found this as the way to go. As a starting point I first wanted to verify
that ecap meta headers really can be provided to Squid in the form of notes
so I tried to log them with %{my-ecap-header}note and %note which failed.

squid.conf logformats tried:
logformat test %{my-ecap-header}note                     // resulting
output: "-"
logformat test %note                                                //
resulting output: "-"
logformat test %{my-ecap-header}adapt::<last_h     //  resulting output:

Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html

More information about the squid-users mailing list