Author: markt
Date: Sat Jun 13 20:54:56 2009
New Revision: 784470

URL: http://svn.apache.org/viewvc?rev=784470&view=rev
Log:
Provide a partial work-around for browsers that ignore charset requirements of 
RFC2616

Modified:
    tomcat/container/branches/tc4.1.x/RELEASE-NOTES-4.1.txt
    
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java

Modified: tomcat/container/branches/tc4.1.x/RELEASE-NOTES-4.1.txt
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/RELEASE-NOTES-4.1.txt?rev=784470&r1=784469&r2=784470&view=diff
==============================================================================
--- tomcat/container/branches/tc4.1.x/RELEASE-NOTES-4.1.txt (original)
+++ tomcat/container/branches/tc4.1.x/RELEASE-NOTES-4.1.txt Sat Jun 13 20:54:56 
2009
@@ -1766,6 +1766,10 @@
          Don't use web application provided XML parser to process tld files
          This is part of CVE-2009-0783
 
+[4.1.40] Error Reporting Valve
+         Use UTF-8 encoding for default error pages to provide a workaround for
+         browsers that ignore that charset requirements of RFC2616
+
 
 ----------------
 Coyote Bug Fixes:

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java?rev=784470&r1=784469&r2=784470&view=diff
==============================================================================
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
 Sat Jun 13 20:54:56 2009
@@ -23,7 +23,6 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.Writer;
-import java.util.Locale;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
@@ -291,12 +290,8 @@
             Writer writer = response.getReporter();
 
             if (writer != null) {
-
-                Locale locale = Locale.getDefault();
-
                 try {
-                    hres.setContentType("text/html");
-                    hres.setLocale(locale);
+                    hres.setContentType("text/html; charset=utf-8");
                 } catch (Throwable t) {
                     if (debug >= 1)
                         log("status.setContentType", t);



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

Reply via email to