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 D1CF510C43 for ; Wed, 11 Sep 2013 00:25:22 +0000 (UTC) Received: (qmail 66408 invoked by uid 500); 11 Sep 2013 00:25:22 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 66346 invoked by uid 500); 11 Sep 2013 00:25:22 -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 66337 invoked by uid 99); 11 Sep 2013 00:25:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2013 00:25:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-wi0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2013 00:25:15 +0000 Received: by mail-wi0-f174.google.com with SMTP id hj3so1461413wib.1 for ; Tue, 10 Sep 2013 17:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VAYvXqvQ2cohT+a5dEq+0pIWBp330kSSHXGbeiuG2dI=; b=elUIhPvWJpHXlIzk5gaMqf8RUnibNpkv2VI+RXk8IuKQwarX6DsTlfYuZJ0OBN3Cnx /0UeCh9OSXcqjyWkmllQw6aGfBNw0HJl1tvkAzyVnOSab1WXqv8D/t7V1t/VOoPRZGl5 KLbVK2P5P6Z7bUH9DPPLNo1VQ1SXiZXfrmEoGReD5JKJ5/JqiwJAwtiKjqDHI/hswJRc 0QM4BVL9pB3D1oBrwMA7zYV7BB6TWjhEj/ovfAPDgCZ4Sv0gxAx6oSdwhNjaT3aqMJuD nAujPp9TBJPH0w/UadfVITpcIgxS5tZnw0x1j5KpbrhuZD/9sOAD2vI3a58wlnyrHAxx tTig== MIME-Version: 1.0 X-Received: by 10.194.80.39 with SMTP id o7mr8864588wjx.39.1378859095385; Tue, 10 Sep 2013 17:24:55 -0700 (PDT) Received: by 10.216.161.196 with HTTP; Tue, 10 Sep 2013 17:24:55 -0700 (PDT) In-Reply-To: <20130815205138.D394C2388980@eris.apache.org> References: <20130815205138.D394C2388980@eris.apache.org> Date: Wed, 11 Sep 2013 04:24:55 +0400 Message-ID: Subject: Re: svn commit: r1514485 - in /tomcat/trunk/java/org/apache: coyote/ajp/AbstractAjpProcessor.java coyote/http11/AbstractOutputBuffer.java coyote/spdy/SpdyProcessor.java tomcat/util/http/HttpMessages.java From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2013/8/16 : > Author: markt > Date: Thu Aug 15 20:51:38 2013 > New Revision: 1514485 > > URL: http://svn.apache.org/r1514485 > Log: > Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55399 > Have the message in the response line use the locale set for the response. > > Modified: > tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java > tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java > tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java > tomcat/trunk/java/org/apache/tomcat/util/http/HttpMessages.java > > > + > + public static HttpMessages getInstance(Locale locale) { > + HttpMessages result = instances.get(locale); > + if (result == null) { > + StringManager sm = StringManager.getManager( > + "org.apache.tomcat.util.http.res", locale); > + if (Locale.getDefault().equals(sm.getLocale())) { > + result = DEFAULT; > + } else { > + result = new HttpMessages(sm); > + } > + instances.put(locale, result); > + } > + return result; > + } > + What a bit bothers me here (and in earlier changes to ErrorReportValve etc. - r1514496) is that locale is provided by client and thus the caches here and in StringManager can grow, instead of being limited to the few locales that are actually bundled with Tomcat. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org