Re: [PATCH] Unknown cfg function

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Tue, 30 Jul 2013 18:03:30 +0300

Hi all,
I am posting an alternate patch.
This patch:

 1) If token starts from ( do not consider it as function parameters
start point and return a token from ( to the next white space

 2) If configuration_includes_quoted_values is set to "on" (new style
enabled) and token ends on a ( character, consider it as function name.
If the token is "parameters" return FunctionParameters type else return
FunctionNameUnknown type and parsing fails

3) If configuration_includes_quoted_values is set to "off" (new style
enabled) and token ends on a (, if the token is "parameters" return
FunctionParameters type, else do not end the token on '(' but to the
next whitespace character.
For example for the string "test(test) more" will return as token the
"test(test)"

For the new style if someone want to use '(' character on a regex for
example, he should use quotes:
 'test(.*/)'
 "test(.*/)"

If someone does not want interpret macros he should use single quotes:
  'test(.*)\/$'

Is it OK?

On 07/29/2013 08:25 PM, Amos Jeffries wrote:
> Looks like nobody actually ran the trivial "-k parse" test using 3.HEAD
> or the initial quoted strings code.
>
> Attached is a patch which adds a secondary form of undo for handling
> incorrectly identified ConfigParser::FunctionNameToken elements. Instead
> of aborting Squid on any non-function token containing a '(' we take the
> wrongly identified assumed function name element and reform it with the
> '(' delimiter and trailing element. The resulting aggregate token which
> should have been identified initially is then sent to the upper parser
> layer.
>
> Amos
>

Received on Tue Jul 30 2013 - 15:03:44 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 30 2013 - 12:00:50 MDT