tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r783570 - /tomcat/current/tc4.1.x/STATUS.txt
Date Thu, 11 Jun 2009 21:32:08 GMT
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

Best regards,
Konstantin Kolinko

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


Mime
View raw message