This is a walkaround patch for the Netscape Navigator's the following
problem:

  If a Web server sends a redirect reply (302) with charset, Netscape
  Navigator 4.x misrecognizes Web page's charset as the redirect
  header's charset, not the Web page's charset.

For example, Tomcat 4 redirect a GET request (http://localhost/) to
its index page (http://localhost/index.html). The current Tomcat 4
replys with "charset=utf-8", Netscape Navigator can't display
Shift-JIS pages correctly.

Kazuhiro Kazama ([EMAIL PROTECTED])     NTT Network Innovation Laboratories
Index: catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
retrieving revision 1.29
diff -c -r1.29 StandardWrapperValve.java
*** catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java       
2001/08/22 21:24:02     1.29
--- catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java       
2001/09/14 13:01:39
***************
*** 878,884 ****
          // Render a default HTML status report page
          try {
              try {
!                 hres.setContentType("text/html; charset=UTF-8");
              } catch (Throwable t) {
                  if (debug >= 1)
                      log("status.setContentType", t);
--- 878,884 ----
          // Render a default HTML status report page
          try {
              try {
!                 hres.setContentType("text/html");
              } catch (Throwable t) {
                  if (debug >= 1)
                      log("status.setContentType", t);

Reply via email to