From: Nathan Hoad Date: Fri, 8 May 2015 19:28:16 +0000 (-0700) Subject: Fix missing external ACL helper notes X-Git-Tag: merge-candidate-3-v1~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1df141741ef1f338b019e129cd2db51de4ebd63;p=thirdparty%2Fsquid.git Fix missing external ACL helper notes external ACL helper notes are only added onto the HTTP request that kicked off the external ACL lookup, and not cached ACL responses. This means if you set notes from an external ACL that are used for some processing in other ACLs, or post-processing on logs, things may be missed. --- diff --git a/src/external_acl.cc b/src/external_acl.cc index 7d65e67383..116b19e32d 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -717,6 +717,9 @@ copyResultsFromEntry(HttpRequest *req, const ExternalACLEntryPointer &entry) if (entry->message.size()) req->extacl_message = entry->message; + + // attach the helper kv-pair to the transaction + UpdateRequestNotes(req->clientConnectionManager.get(), *req, entry->notes); } } @@ -1534,18 +1537,6 @@ ExternalACLLookup::LookupDone(void *data, const ExternalACLEntryPointer &result) { ACLFilledChecklist *checklist = Filled(static_cast(data)); checklist->extacl_entry = result; - - // attach the helper kv-pair to the transaction - if (checklist->extacl_entry != NULL) { - if (HttpRequest * req = checklist->request) { - // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes(). - // workaround by using anything already set in HttpRequest - // OR use new and rely on a later Sync copying these to AccessLogEntry - - UpdateRequestNotes(checklist->conn(), *req, checklist->extacl_entry->notes); - } - } - checklist->resumeNonBlockingCheck(ExternalACLLookup::Instance()); }