[squid-dev] [PATCH] Incorrect processing of long URIs

Amos Jeffries squid3 at treenet.co.nz
Thu Aug 25 16:26:47 UTC 2016


On 25/08/2016 11:31 a.m., Eduard Bagdasaryan wrote:
> 2016-08-23 17:50 GMT+03:00 Alex Rousskov:
> 
>> s/request-line/request-line: URI/ for consistency and clarity sake.
> 
>> I wonder whether we should make this variable static to avoid repeated
>> function calls on a performance-sensitive code path. Same for the old
>> "delimiters" variable left inside parseRequestFirstLine(), of course.
> 

The output of DelimiterCharacters() cannot be stored in a static because
it possibly changes with a reconfigure.

It already outputs a reference to a static in the complex case. About
the only further optimization we can do there is make the
"CharacterSet::SP" that it outputs in the sensitive path be a local
static *within* DelimiterCharacters() itself and return a reference to
that instead of constructing a new CharaterSet each time.


Other than that it looks okay to me. +1.
 Alex can you apply please with the above taken care of?

Amos



More information about the squid-dev mailing list