From 3cf6e9c5b4932c350e14fc9c0a0b328fe1935d4c Mon Sep 17 00:00:00 2001 From: hno <> Date: Tue, 22 May 2007 07:16:39 +0000 Subject: [PATCH] %URI external_acl_type tag for referencing the complete URI --- src/cf.data.pre | 3 ++- src/external_acl.cc | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/cf.data.pre b/src/cf.data.pre index c1a26fb442..74b33b6b0a 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.435 2007/05/17 19:55:52 hno Exp $ +# $Id: cf.data.pre,v 1.436 2007/05/22 01:16:39 hno Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -2050,6 +2050,7 @@ DOC_START %IDENT Ident user name %SRC Client IP %SRCPORT Client source port + %URI Requested URI %DST Requested host %PROTO Requested protocol %PORT Requested port diff --git a/src/external_acl.cc b/src/external_acl.cc index bcd1f74fcc..2066b15996 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1,6 +1,6 @@ /* - * $Id: external_acl.cc,v 1.78 2007/05/18 06:41:24 amosjeffries Exp $ + * $Id: external_acl.cc,v 1.79 2007/05/22 01:16:40 hno Exp $ * * DEBUG: section 82 External ACL * AUTHOR: Henrik Nordstrom, MARA Systems AB @@ -143,6 +143,7 @@ struct _external_acl_format EXT_ACL_SRCPORT, EXT_ACL_MYADDR, EXT_ACL_MYPORT, + EXT_ACL_URI, EXT_ACL_DST, EXT_ACL_PROTO, EXT_ACL_PORT, @@ -337,6 +338,8 @@ parse_externalAclHelper(external_acl ** list) format->type = _external_acl_format::EXT_ACL_MYADDR; else if (strcmp(token, "%MYPORT") == 0) format->type = _external_acl_format::EXT_ACL_MYPORT; + else if (strcmp(token, "%URI") == 0) + format->type = _external_acl_format::EXT_ACL_URI; else if (strcmp(token, "%DST") == 0) format->type = _external_acl_format::EXT_ACL_DST; else if (strcmp(token, "%PROTO") == 0) @@ -450,6 +453,7 @@ dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl DUMP_EXT_ACL_TYPE(SRCPORT); DUMP_EXT_ACL_TYPE(MYADDR); DUMP_EXT_ACL_TYPE(MYPORT); + DUMP_EXT_ACL_TYPE(URI); DUMP_EXT_ACL_TYPE(DST); DUMP_EXT_ACL_TYPE(PROTO); DUMP_EXT_ACL_TYPE(PORT); @@ -798,6 +802,10 @@ makeExternalAclKey(ACLChecklist * ch, external_acl_data * acl_data) str = buf; break; + case _external_acl_format::EXT_ACL_URI: + str = urlCanonical(request); + break; + case _external_acl_format::EXT_ACL_DST: str = request->host; break; -- 2.47.2