tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector RequestBase.java
Date Fri, 13 Oct 2000 05:27:35 GMT
craigmcc    00/10/12 22:27:34

  Modified:    catalina/src/share/org/apache/catalina/connector
                        RequestBase.java
  Log:
  Default character encoding for requests is now "ISO-8859-1" instead of the
  JVM default, for consistency with the default character encoding on responses.
  
  Revision  Changes    Path
  1.5       +10 -10    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java
  
  Index: RequestBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RequestBase.java	2000/09/09 01:55:44	1.4
  +++ RequestBase.java	2000/10/13 05:27:33	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
1.4 2000/09/09 01:55:44 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/09/09 01:55:44 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/RequestBase.java,v
1.5 2000/10/13 05:27:33 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/10/13 05:27:33 $
    *
    * ====================================================================
    *
  @@ -97,7 +97,7 @@
    * the connector-specific methods need to be implemented.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2000/09/09 01:55:44 $
  + * @version $Revision: 1.5 $ $Date: 2000/10/13 05:27:33 $
    */
   
   public abstract class RequestBase
  @@ -689,7 +689,10 @@
        */
       public String getCharacterEncoding() {
   
  -	return (this.characterEncoding);
  +        if (this.characterEncoding == null)
  +            return ("ISO-8859-1");
  +        else
  +            return (this.characterEncoding);
   
       }
   
  @@ -837,11 +840,8 @@
   
   	if (reader == null) {
   	    String encoding = getCharacterEncoding();
  -	    InputStreamReader isr = null;
  -	    if (encoding != null)
  -		isr = new InputStreamReader(createInputStream(), encoding);
  -	    else
  -		isr = new InputStreamReader(createInputStream());
  +	    InputStreamReader isr =
  +		new InputStreamReader(createInputStream(), encoding);
   	    reader = new BufferedReader(isr);
   	}
   	return (reader);
  
  
  

Mime
View raw message