Re: backslashes in config and change of strwordtok()

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 26 Jan 2005 01:08:49 +0100 (CET)

On Wed, 26 Jan 2005, Evgeny Kotsuba wrote:

> as it was function with knowledge of quoting I used precise handling
> for "\\\\" and "\\\"" cases
>
> default:
> if(ch == '\\' && (p[1] == '\\' || p[1] == '\"'))
> { p++;
> *d++ = ch = *p;
> if (ch)
> p++;
> } else {
> if (!quoted && isspace(*p)) {
> p++;
> goto done;
> }
> *d++ = *p++;
> }
> break;

Which is not what the standard function did read like, but I see your
point. Perhaps this function should be split in two versions, one for
external acl communication, another for general "list of words" parsing.

Historically the function came from the external acl implementation but
then found more uses. And today external acl is moving away from using
this function in favor for URL escaped strings (default in Squid-3, also
supported by Squid-2.5)

Regards
Henrik
Received on Tue Jan 25 2005 - 17:08:51 MST

This archive was generated by hypermail pre-2.1.9 : Tue Feb 01 2005 - 12:00:02 MST