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: r892293 - in /tomcat/trunk/java: javax/servlet/http/ org/apache/catalina/authenticator/ org/apache/catalina/core/ org/apache/catalina/realm/ org/apache/catalina/valves/ org/apache/jasper/resources/
Date Sun, 20 Dec 2009 05:26:56 GMT
2009/12/20 Mark Thomas <markt@apache.org>:
>
> I don't view an HTTP header where the message is a long string of ????
> characters as better. In that case I think the use English text is a
> better option. Neither do I think we want too many configuration options
> here.
>
> What do you think to the following as an approach:
>
> 1. Revert r892293
> 2. Write an isSafeForHttpHeader() function
> 3. Replace all instances of
> if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER) {
> with
> if (org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER &&
>        isSafeForHttpHeader(response.getMessage())) {
>
> That would allow i18n to be used in the body of the response and in the
> HTTP headers if it were safe. If it were not safe, the default would be
> used. The user any pays the performance hit of the isSafeForHttpHeader()
> test if they elect to use custom messages.
>
> Mark

I like it.

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