[squid-dev] [PATCH] shell un-escaping squidclient -H option
Amos Jeffries
squid3 at treenet.co.nz
Fri May 20 05:26:24 UTC 2016
On 20/05/2016 8:52 a.m., Alex Rousskov wrote:
> On 05/19/2016 07:51 AM, Amos Jeffries wrote:
>> The squidclient -H parameter takes a string with some limited
>> shellescaped characters. Currently just \n was expanded to the CRLF
>> sequence. Other shell escaped characters were left untouched.
>>
>> However, to properly test headers containing weird CR, LF and HTAB
>> positioning it needs to be able to receive these special characters
>> individually and thus unescape them.
>>
>> Add a new function similar to perform shell unescape with special
>> characters \r, \n, and \t. All other characters are un-escaped to
>> themselves. Including '\\'.
>
> I recommend warning about unsupported escapes (at least). This does not
> count \\ that is/should be supported, of course.
>
>> + unsigned char ch;
>> +
>> + while ((ch = *p)) {
>
>
> It looks like you meant to simply say
>
> while (unsigned char ch = *p) {
>
>
> No objections to the patch either way -- I do not intend to review it.
>
>
> Alex.
>
>
Thanks. Added those suggested changes and applied as rev.14676.
Amos
More information about the squid-dev
mailing list