[squid-dev] [PATCH] Case-insensitive URI schemes
eduard.bagdasaryan at measurement-factory.com
Wed Feb 1 14:45:35 UTC 2017
This is a bit improved version of previous patch:
fill static schemes array at configuration phase.
On 31.01.2017 16:18, Eduard Bagdasaryan wrote:
> Optimized with static array as you suggested and
> re-attached the patch.
> On 30.01.2017 19:24, Alex Rousskov wrote:
>> On 01/29/2017 07:10 AM, Amos Jeffries wrote:
>>> I'm thinking the quick-and-dirty way is to just lowercase the 'proto'
>>> variable in url.cc urlParse() function. Doing that in the for-loop
>>> it is copied from 'src' would be easiest.
>>> - it breaks the case preservation on unknown schemes a litte bit. But
>>> since they are supposed to be insensitive anyway the harm is minimal.
>> The UriScheme constructor is broken. No quick-and-dirty fix in some
>> constructor caller will address that problem. Eduard's patch fixes that
>> problem the right way. Unfortunately, the fixed constructor is
>> expensive. Fortunately, it is easy to optimize it, addressing another
>> old problem (that the patch has documented but did not address). With
>> that optimization, there will be no motivation for quick-and-dirty
>> Eduard, please create and use a UriScheme::SchemeImages or similar
>> static array with lowercase versions of ProtocolType_str.
>> Thank you,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10878 bytes
Desc: not available
More information about the squid-dev