=== modified file 'src/acl/Checklist.cc' --- src/acl/Checklist.cc 2009-03-08 19:41:27 +0000 +++ src/acl/Checklist.cc 2011-06-10 13:56:17 +0000 @@ -369,6 +369,29 @@ return currentAnswer() == ACCESS_DENIED; } +bool +ACLChecklist::reusableFastCheck() +{ + currentAnswer(ACCESS_DENIED); + debugs(28, 5, "reusableCheckFast: list: " << accessList); + const acl_access *acl = cbdataReference(accessList); + while (acl != NULL && cbdataReferenceValid(acl)) { + preCheck(); + if (matchAclListFast(acl->aclList)) { + cbdataReferenceDone(acl); + return currentAnswer() == ACCESS_ALLOWED; + } + + /* + * Reference the next access entry + */ + const acl_access *A = acl; + acl = cbdataReference(acl->next); + cbdataReferenceDone(A); + } + debugs(28, 5, "reusableCheckFast: no matches, returning: " << (currentAnswer() == ACCESS_DENIED)); + return currentAnswer() == ACCESS_DENIED; +} bool ACLChecklist::checking() const === modified file 'src/acl/Checklist.h' --- src/acl/Checklist.h 2009-04-07 13:51:57 +0000 +++ src/acl/Checklist.h 2011-06-10 12:42:35 +0000 @@ -113,6 +113,14 @@ int fastCheck(); /** + * Trigger a blocking access check for a given access list + * The behavior and the result is similar to the ::fastCheck method, + * but this method does not change the internal state of the ACLChecklist + * object and each execution run an indepeneded access list check. + */ + bool reusableFastCheck(); + + /** * Trigger a blocking access check for a single ACL line (a AND b AND c). * * ACLs which cannot be satisfied directly from available data are ignored. === modified file 'src/ssl/support.cc' --- src/ssl/support.cc 2011-05-13 07:59:19 +0000 +++ src/ssl/support.cc 2011-06-10 16:09:21 +0000 @@ -243,7 +243,7 @@ } if (!ok && check) { - if (check->fastCheck()) { + if (check->reusableFastCheck()) { debugs(83, 3, "bypassing SSL error " << ctx->error << " in " << buffer); ok = 1; } else {