CBDATA_CLASS_INIT(ExternalACLEntry);
-ExternalACLEntry::ExternalACLEntry()
+ExternalACLEntry::ExternalACLEntry() :
+ notes()
{
lru.next = lru.prev = NULL;
result = ACCESS_DENIED;
{
date = squid_curtime;
result = someData.result;
+
+ // replace all notes. not combine
+ notes.entries.clean();
+ notes.append(&someData.notes);
+
#if USE_AUTH
user = someData.user;
password = someData.password;
#include "acl/Acl.h"
#include "cbdata.h"
#include "hash.h"
+#include "Notes.h"
#include "SquidString.h"
class external_acl;
ExternalACLEntryData() : result(ACCESS_DUNNO) {}
allow_t result;
+
+ /// list of all kv-pairs returned by the helper
+ NotePairs notes;
+
#if USE_AUTH
// TODO use an AuthUser to hold this info
String user;
dlink_node lru;
allow_t result;
time_t date;
+
+ /// list of all kv-pairs returned by the helper
+ NotePairs notes;
+
#if USE_AUTH
String user;
String password;
// XXX: make entryData store a proper HelperReply object instead of copying.
+ entryData.notes.append(&reply.notes);
+
const char *label = reply.notes.findFirst("tag");
if (label != NULL && *label != '\0')
entryData.tag = label;
{
ACLFilledChecklist *checklist = Filled(static_cast<ACLChecklist*>(data));
checklist->extacl_entry = cbdataReference((external_acl_entry *)result);
+
+ // attach the helper kv-pair to the transaction
+ 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
+ if (!req->notes)
+ req->notes = new NotePairs;
+
+ req->notes->appendNewOnly(&checklist->extacl_entry->notes);
+ }
+
checklist->resumeNonBlockingCheck(ExternalACLLookup::Instance());
}