Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55C86C6C3 for ; Fri, 28 Nov 2014 17:06:15 +0000 (UTC) Received: (qmail 71340 invoked by uid 500); 28 Nov 2014 17:06:14 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 71256 invoked by uid 500); 28 Nov 2014 17:06:14 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 71244 invoked by uid 99); 28 Nov 2014 17:06:14 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 17:06:14 +0000 Received: from s2laptop.dev.local (host86-136-147-158.range86-136.btcentralplus.com [86.136.147.158]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 4ED171A0019 for ; Fri, 28 Nov 2014 17:05:58 +0000 (UTC) Message-ID: <5478AB81.2040201@apache.org> Date: Fri, 28 Nov 2014 17:06:09 +0000 From: Mark Thomas User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r1642307 - in /tomcat/trunk: java/org/apache/tomcat/websocket/CaseInsensitiveKeyMap.java test/org/apache/tomcat/websocket/TestCaseInsensitiveKeyMap.java References: <20141128145316.48FFF238903B@eris.apache.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 28/11/2014 15:44, Rémy Maucherat wrote: > 2014-11-28 16:20 GMT+01:00 Martin Grigorov :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-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org