Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 96509 invoked from network); 11 Jun 2009 21:52:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jun 2009 21:52:56 -0000 Received: (qmail 57237 invoked by uid 500); 11 Jun 2009 21:53:06 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 57174 invoked by uid 500); 11 Jun 2009 21:53:06 -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 57163 invoked by uid 99); 11 Jun 2009 21:53:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 21:53:06 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [193.252.22.151] (HELO smtp6.freeserve.com) (193.252.22.151) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 21:52:56 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3514.me.freeserve.com (SMTP Server) with ESMTP id B34517000087 for ; Thu, 11 Jun 2009 23:52:35 +0200 (CEST) Received: from smtp.homeinbox.net (unknown [91.109.186.196]) by mwinf3514.me.freeserve.com (SMTP Server) with ESMTP id 87F5A7000082 for ; Thu, 11 Jun 2009 23:52:35 +0200 (CEST) X-ME-UUID: 20090611215235557.87F5A7000082@mwinf3514.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by smtp.homeinbox.net (Postfix) with ESMTP id 9E5801A4D3F for ; Thu, 11 Jun 2009 22:52:34 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from smtp.homeinbox.net ([127.0.0.1]) by localhost (server01.dev.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q2Fgl8zJfLtw for ; Thu, 11 Jun 2009 22:52:30 +0100 (BST) Received: from [192.168.0.9] (study03.dev.local [192.168.0.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.homeinbox.net (Postfix) with ESMTPSA id CD39F1A40BB for ; Thu, 11 Jun 2009 22:52:30 +0100 (BST) Message-ID: <4A317C98.50408@apache.org> Date: Thu, 11 Jun 2009 22:52:24 +0100 From: Mark Thomas User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r783570 - /tomcat/current/tc4.1.x/STATUS.txt References: <20090610233458.049422388882@eris.apache.org> <4A312988.2040000@apache.org> <427155180906111041j32807c5ap7868bfd210902e27@mail.gmail.com> <4A315DD0.8070706@apache.org> <427155180906111432h449f2deg7505055d6d202f2@mail.gmail.com> In-Reply-To: <427155180906111432h449f2deg7505055d6d202f2@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Konstantin Kolinko wrote: > Thank you for detailed explanation. > > My analysis is the following: > hres.setLocale(locale); > call -> o.a.c.Response.setLocale() -> o.a.c.connector.ResponseBase.setLocale() > > In o.a.c.connector.ResponseBase.setLocale() it calls > CharsetMapper.getCharset(locale) > and updates the contentType header. > > The problem is with those locales for which CharsetMapper.getCharset(locale) > returns null. There is an error in ResponseBase.setLocale() that it will set > contentType = contentType + ";charset=null" > in those cases. How about fixing that? > > My understanding is that it will solve the issue, and won't change the > error page encoding for existing applications. > > We cannot fix CharsetMapper, because it can be overwritten, but we can > fix those places where it is called. > > Here is the patch: > http://people.apache.org/~kkolinko/patches/2009-06-12_tc41_CharsetMapper.patch Yep, that would also fix the issue. However, that patch changes the behaviour of setLocale(). Whilst it shouldn't cause a regression there is a risk that it might for some applications. The 'right' / 'proper' fix for TC4 would be to implement STRICT_SERVLET_COMPLIANCE and in particular, the change to getWriter(). Again, there is the risk of regression with this approach. TC6 and TC5 already use UTF-8 for Tomcat's default error page. The proposed TC4 page brings TC4 into line with TC5 and TC6. My personal preference is for the small as possible 'band-aid' approach to minimise the regression risk. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org