Re: [PATCΗ] Quoted values in squid.conf

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Sun, 30 Jun 2013 20:21:17 +0300

I am attaching a new version of the patch.

This patch replaces the file:/path/to/file style for including
parameters from external files with a function like style:
    parameters("/path/to/file")

The MacroUser class removed . Now no check for valid %macros done inside
configuration parsing code.
If a developer need to allow %macros inside quotes for a cfg parameter
he can use the new
ConfigParser::EnableMacros()/ConfigParser::DisableMacros() method as
follows:

   ConfigParser::EnableMacros();
   String token = ConfigParser::NextToken();
   ConfigParser::DisableMacros();

Notes
~~~~

From the final user point of view this patch:
1) allow the following configuration:
  # Http port configurations
  http_port 8080 parameters("/etc/squid/http-port-opts.conf")
 
  #old style acls
  configuration_includes_quoted_values off
  acl filed src "/usr/local/squid3-cvs/etc/ip-addresses.txt"
  configuration_includes_quoted_values on

2) Does not allow inside double quoted strings an escaped $ or %
character if the parameter does not support macros.

3) If someone want to use double quotes inside a quoted string can use
the escape character:
  logformat mine "%>a %ui %http::un [%tl] \"%rm %ru HTTP/%rv\"
%http::Hs %\"{Referer}http::>ha"

4) Unquoted values parsed as before this patch.

TODO
~~~~

The initial specifications included no macro expansion inside single
quotes (The ${process_name} and ${process_number} and any other new
macro will be added should not expand inside single quotes). This is
requires many changes in configuration file pre-processing code, so it
is not implemented.

Received on Sun Jun 30 2013 - 17:21:44 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 01 2013 - 12:00:08 MDT