--------------------- PatchSet 866 Date: 2000/11/24 00:19:20 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: trivial optimisation to prevent reparsing and authentication proxy_auth on multiple ACL's for a single request. Members: src/acl.c:1.1.1.3.12.26.2.6->1.1.1.3.12.26.2.7 Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.6 retrieving revision 1.1.1.3.12.26.2.7 diff -u -r1.1.1.3.12.26.2.6 -r1.1.1.3.12.26.2.7 --- squid/src/acl.c 24 Nov 2000 00:01:02 -0000 1.1.1.3.12.26.2.6 +++ squid/src/acl.c 24 Nov 2000 00:19:20 -0000 1.1.1.3.12.26.2.7 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.26.2.6 2000/11/24 00:01:02 rbcollins Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.7 2000/11/24 00:19:20 rbcollins Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1221,7 +1221,7 @@ debug(28,6) ("aclMatchProxyAuth: header %s.\n", proxy_auth); if (auth_user == NULL) { debug(28,5) ("aclMatchProxyAuth: This is a new request on FD:%d\n", checklist->conn->fd); - if (checklist->conn->auth_type==AUTH_UNKNOWN) { + if ((!checklist->request->auth_user) && (checklist->conn->auth_type==AUTH_UNKNOWN )) { /* beginning of a new request check */ debug(28,5)("aclMatchProxyAuth: no connection authentication type\n"); if (!authenticateValidateUser(auth_user=authenticateGetAuthUser(proxy_auth))) { @@ -1232,10 +1232,14 @@ } /* lock the new user request for this ACL processing */ authenticateAuthUserLock(auth_user); + } else if (checklist->request->auth_user) { + auth_user=checklist->request->auth_user; + /* lock the user request for this ACL processing */ + authenticateAuthUserLock(auth_user); } else { if (checklist->conn->auth_user != NULL) { auth_user=checklist->conn->auth_user; - /* lock the new user request for this ACL processing */ + /* lock the user request for this ACL processing */ authenticateAuthUserLock(auth_user); } else { /* failed connection based authentication */