Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 13377 invoked from network); 12 Jun 2009 16:55:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jun 2009 16:55:52 -0000 Received: (qmail 25615 invoked by uid 500); 12 Jun 2009 16:56:03 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 25521 invoked by uid 500); 12 Jun 2009 16:56:02 -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 25510 invoked by uid 99); 12 Jun 2009 16:56:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2009 16:56:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.218.225 as permitted sender) Received: from [209.85.218.225] (HELO mail-bw0-f225.google.com) (209.85.218.225) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2009 16:55:53 +0000 Received: by bwz25 with SMTP id 25so2685754bwz.0 for ; Fri, 12 Jun 2009 09:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=81ah6r42sA/BkX6K22bW4SL10VmLCJhKkPzM91Dtp1c=; b=ijQ1aCQKM2AmYEA1lR+eluF2+AxJRXi+8t/C+ljAbv/S0Yehb0Za7KS/5autJRCw4u Yf8WzwUTdo0UqOpVup4BWqNfp0XkVaFtnDLMsIZwiUFvGTqqLv2raoLJNJUFVANmH8B0 CctFas7xBDpXiKJbgGXLnXMGWCqYHHVbs/oh8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=f9eqP4cdxDk02DEQea3ZEuWUIkiIfa5HNqc1be1gZLzJbh0jwcYZeXgPlWwLD2nLSE CqL0inbigUnL6P1SEgjfsmRQalu9ihLYFqBFx4x7pZnwtfh+p0mirgMzXyJ1M3x/0h2b psKJRBW2R5vwzvYyVPJCptAcQO6cHBe6ZErQE= MIME-Version: 1.0 Received: by 10.103.213.10 with SMTP id p10mr387049muq.132.1244825732880; Fri, 12 Jun 2009 09:55:32 -0700 (PDT) In-Reply-To: <4A317C98.50408@apache.org> References: <20090610233458.049422388882@eris.apache.org> <4A312988.2040000@apache.org> <427155180906111041j32807c5ap7868bfd210902e27@mail.gmail.com> <4A315DD0.8070706@apache.org> <427155180906111432h449f2deg7505055d6d202f2@mail.gmail.com> <4A317C98.50408@apache.org> Date: Fri, 12 Jun 2009 20:55:32 +0400 Message-ID: <427155180906120955l72386104m28054427a2b597a0@mail.gmail.com> Subject: Re: svn commit: r783570 - /tomcat/current/tc4.1.x/STATUS.txt From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2009/6/12 Mark Thomas : > Konstantin Kolinko wrote: >> Thank you for detailed explanation. >> >> My analysis is the following: >> hres.setLocale(locale); >> call -> =A0o.a.c.Response.setLocale() -> o.a.c.connector.ResponseBase.se= tLocale() >> >> 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(loc= ale) >> returns null. =A0There is an error in ResponseBase.setLocale() that it w= ill set >> =A0contentType =3D contentType + ";charset=3Dnull" >> 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. > I do not like that your patch changes behavior where it was not broken previously. Theoretically, there might be someone who relies on the encoding of those error pages, but, well, those pages are for humans, and we are free to change them for readability or for any other purpose. OK, I give my +1. Anyway, just as a thought, here is another version of setLocale patch, http://people.apache.org/~kkolinko/patches/2009-06-12_tc41_CharsetMapper_v2= .patch I am not very interested in it, though. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org