]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
%URI external_acl_type tag for referencing the complete URI
authorhno <>
Tue, 22 May 2007 07:16:39 +0000 (07:16 +0000)
committerhno <>
Tue, 22 May 2007 07:16:39 +0000 (07:16 +0000)
src/cf.data.pre
src/external_acl.cc

index c1a26fb4427e276a80b9d21724584e1df1fcf9bc..74b33b6b0a54199ea8af2891522ead1ebcaecba8 100644 (file)
@@ -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
index bcd1f74fcc19bc3786159adddaac4a321fe9fe09..2066b1599611782bfcb3dc22541d47be96583c82 100644 (file)
@@ -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;