]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Supply ALE for note ACL (#463)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 5 Sep 2019 05:46:59 +0000 (05:46 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Sun, 8 Sep 2019 13:18:04 +0000 (01:18 +1200)
The following cache.log WARNING is a symptom of this bug:

    ACL is used in context without an ALE state. Assuming mismatch.

Commit cb36505 already covered many (but not all) similar cases.

src/cf.data.pre
src/client_side.cc

index 513a04f140824c4f1ffa37d04d5342de9439ac1d..aaa87125eb7eb7b4cddf79ec6d1adf70a24c0e88 100644 (file)
@@ -6563,6 +6563,9 @@ DOC_START
 
            note key value acl ...
            logformat myFormat ... %{key}note ...
+
+       This clause only supports fast acl types.
+       See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
 DOC_END
 
 NAME: relaxed_header_parser
index 7c0121a56525f128e6887ce70994bbe5fc3cf2d4..975a521d2a1cae2551552b2542758a3a9516b372 100644 (file)
@@ -425,7 +425,7 @@ ClientHttpRequest::logRequest()
         // The al->notes and request->notes must point to the same object.
         (void)SyncNotes(*al, *request);
         for (auto i = Config.notes.begin(); i != Config.notes.end(); ++i) {
-            if (const char *value = (*i)->match(request, al->reply, NULL)) {
+            if (const char *value = (*i)->match(request, al->reply, al)) {
                 NotePairs &notes = SyncNotes(*al, *request);
                 notes.add((*i)->key.termedBuf(), value);
                 debugs(33, 3, (*i)->key.termedBuf() << " " << value);