[squid-dev] [PATCH] Case-insensitive URI schemes

Eduard Bagdasaryan eduard.bagdasaryan at measurement-factory.com
Thu Feb 2 12:53:07 UTC 2017


I applied your polishing suggestions to my latest patch
re-attached it.


Eduard.


On 02.02.2017 11:33, Amos Jeffries wrote:
> On 1/02/2017 2:18 a.m., Eduard Bagdasaryan wrote:
>> Optimized with static array as you suggested and
>> re-attached the patch.
>>
> Thank you, looks like this one removes most of the performance regression.
>
> Just some polishing for src/anyp/UriScheme.cc ;
>
>
> in AnyP::UriScheme::UriScheme
>
> * this TODO seems reasonable and simple enough, please do it:
>
>   +    // the caller knows nothing about the scheme
> +    // TODO: Avoid special casing by storing this string in the
> generated ProtocolType_str?
>       else if (theScheme_ == AnyP::PROTO_UNKNOWN)
> -        // image could be actually unknown and not provided
>           image_ = "(unknown)";
>
>
> in AnyP::UriScheme::LowercaseScheme:
>
> * please use the Squid coding style of parameters being on a line before
> the function name.
>
> * please do use emplace_back instead of push_back. Simple as it is the
> SBuf is not a pointer.
>
> * please add a TODO note about making the ProtocolType enum use
> base/EnumIterator.h instead of an int for-loop.
>
>
> +1. I don't think this needs another review, just the polish.
>
> Amos
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-262-case-insensitive-schemes-t6.patch
Type: text/x-patch
Size: 9555 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170202/ee107746/attachment.bin>


More information about the squid-dev mailing list