On 28/11/2014 15:44, Rémy Maucherat wrote:
> 2014-11-28 16:20 GMT+01:00 Martin Grigorov <mgrigo...@apache.org>:I'm not
> sure I follow you.
> 
>> Assuming 'headers' is an instance of CaseInsensitiveKeyMap then:
>> - headers.get("BLAH") will delegate to innerMap.get(key{"blah"})   //
>> Perl-ish syntax to express what I mean
>> - headers.get("bLAh") will also delegate to innerMap.get(key{"blah"})
>>
>> so everything should be OK

Part of the problem here is that this class is trying to meet a
currently undocumented specification. The WebSocket's TCK appears to be
testing (I say appears as I don't have access to it - I am just trying
to fix the associated issue) a requirement that is not documented in the
WebSocket spec.

Until the actual requirement is documented I simply don't know what
requirement this implementation has to meet.

The current implementation aims to be case insensitive while conserving
(as far as is possible) the original case of the key. Whether this is
overkill is TBD.

> I am talking about the impl as is in websockets right now, the case
> insensitivity is not done right. Besides that, it is possible this new impl
> could be optimized (or not).

I am almost certain that there will be scope for optimisation. I was
aiming for minimal, clear code rather than performance. I doubt - given
the way that this class will be used - that performance will be an issue
but we can always come back to it if it is.

I suspect that much more optimisation will be possible once we know what
the real requirement is.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to