tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector HttpResponseBase.java
Date Thu, 21 Feb 2002 18:30:57 GMT
remm        02/02/21 10:30:57

  Modified:    catalina/src/share/org/apache/catalina/connector
                        HttpResponseBase.java
  Log:
  - If the encoding is invalid, response output wouldn't work (bug 6201).
  
  Revision  Changes    Path
  1.46      +11 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java
  
  Index: HttpResponseBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- HttpResponseBase.java	30 Jan 2002 03:45:23 -0000	1.45
  +++ HttpResponseBase.java	21 Feb 2002 18:30:57 -0000	1.46
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
1.45 2002/01/30 03:45:23 billbarker Exp $
  - * $Revision: 1.45 $
  - * $Date: 2002/01/30 03:45:23 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
1.46 2002/02/21 18:30:57 remm Exp $
  + * $Revision: 1.46 $
  + * $Date: 2002/02/21 18:30:57 $
    *
    * ====================================================================
    *
  @@ -68,6 +68,7 @@
   import java.io.IOException;
   import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
  +import java.io.UnsupportedEncodingException;
   import java.net.MalformedURLException;
   // import java.net.URL;
   import java.security.AccessController;
  @@ -103,7 +104,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.45 $ $Date: 2002/01/30 03:45:23 $
  + * @version $Revision: 1.46 $ $Date: 2002/02/21 18:30:57 $
    */
   
   public class HttpResponseBase
  @@ -589,8 +590,12 @@
           }
   
           // Prepare a suitable output writer
  -        OutputStreamWriter osr =
  -            new OutputStreamWriter(getStream(), getCharacterEncoding());
  +        OutputStreamWriter osr = null;
  +        try {
  +            osr = new OutputStreamWriter(getStream(), getCharacterEncoding());
  +        } catch (UnsupportedEncodingException e) {
  +            osr = new OutputStreamWriter(getStream());
  +        }
           final PrintWriter outputWriter = new PrintWriter(osr);
   
           // Send the "Status:" header
  
  
  

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


Mime
View raw message