From: Christos Tsantilas Date: Fri, 19 Feb 2016 17:19:25 +0000 (+0200) Subject: external_acl parameters separated by %20 instead of space X-Git-Tag: SQUID_4_0_7~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=262eaf9a60fa26b03c4a66d145b880e72aa7718b;p=thirdparty%2Fsquid.git external_acl parameters separated by %20 instead of space If an external ACL is configured with more than one parameter as shown in the example below, then Squid sends those parameters to the external_acl helper separated by %20 characters instead of spaces: acl TEST external ACLTYPE param1=val1 param2=val2 This change fixes regression introduced in trunk r14351 (Support logformat %macros in external_acl_type format) but more work may be needed to make Squid behave as squid.conf.documented promises. This is a Measurement Factory project. --- diff --git a/src/cf.data.pre b/src/cf.data.pre index dfe482b14b..bd66346231 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -712,7 +712,7 @@ DOC_START This option defines external acl classes using a helper program to look up the status - external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..] + external_acl_type name [options] FORMAT /path/to/helper [helper arguments] Options: @@ -774,13 +774,18 @@ DOC_START %ACL The name of the ACL being tested. - %DATA The ACL arguments. If a logformat encoding modifier - is used it will encode the whole set of arguments - as a single token. + %DATA The ACL arguments separated by spaces (an + "argument string"). - If not used; then any arguments are automatically - added at the end of the line sent to the helper - as separately URL-encoded fields. + By default, Squid applies URL-encoding to each ACL + argument inside the argument string. If an explicit + encoding modifier is used (e.g., %#DATA), then Squid + encodes the whole argument string as a single token + (e.g., with %#DATA, spaces between arguments become + %20). + + If you do not specify a DATA macro inside FORMAT, + Squid automatically appends %DATA to your FORMAT. If SSL is enabled, the following formating codes become available: diff --git a/src/external_acl.cc b/src/external_acl.cc index 952e69d0d9..9671129988 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -326,7 +326,7 @@ parse_externalAclHelper(external_acl ** list) if (!data_used) { *fmt = new Format::Token; (*fmt)->type = Format::LFT_EXT_ACL_DATA; - (*fmt)->quote = Format::LOG_QUOTE_URL; + (*fmt)->quote = Format::LOG_QUOTE_NONE; } /* helper */