tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteRequest.java
Date Thu, 20 Nov 2003 01:14:31 GMT
luehe       2003/11/19 17:14:31

  Modified:    catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteRequest.java
  Log:
  Do not store the charset specified in
  ServletRequest.setCharacterEncoding() if the request params have
  already been parsed or a reader/inputstream for the request body has
  already been acquired, so that it won't be returned by
  ServletRequest.getCharacterEncoding()
  
  Revision  Changes    Path
  1.22      +8 -4      jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteRequest.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- CoyoteRequest.java	17 Nov 2003 09:40:17 -0000	1.21
  +++ CoyoteRequest.java	20 Nov 2003 01:14:31 -0000	1.22
  @@ -1493,6 +1493,10 @@
       public void setCharacterEncoding(String enc)
           throws UnsupportedEncodingException {
   
  +	if (requestParametersParsed || usingReader || usingInputStream) {
  +            return;
  +        }
  +  
           // Ensure that the specified encoding is valid
           byte buffer[] = new byte[1];
           buffer[0] = (byte) 'a';
  
  
  

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


Mime
View raw message