Re: [PATCH] Request URI logging for malformed requests

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 02 Mar 2011 14:07:16 +1300

 On Wed, 02 Mar 2011 14:00:29 +1300, Amos Jeffries wrote:
> On Tue, 01 Mar 2011 20:29:51 +0200, Tsantilas Christos wrote:
>> This patch is forgotten too.
>> Any comments?
>>
>
> Just doing a quick audit now...
>
>
 <snip>

> case URI_WHITESPACE_ENCODE:
> http->log_uri = xstrndup(rfc1738_escape_unescaped(uri),
> MAX_URL);
> break;
>
> case URI_WHITESPACE_CHOP:
> http->log_uri = xstrndup(uri,
> min(MAX_URL,strcspn(http->log_uri, w_space)));

 Oops, that should have been: strcspn(uri, w_space)

> break;
>
> case URI_WHITESPACE_DENY:
> case URI_WHITESPACE_STRIP:
> default:
> {
> char *q = static_cast<char*>(xmalloc(strlen(uri)*3 + 1));

 Amos
Received on Wed Mar 02 2011 - 01:07:22 MST

This archive was generated by hypermail 2.2.0 : Mon Mar 07 2011 - 12:00:03 MST