larryi      2003/11/20 08:11:37

  Modified:    coyote/src/java/org/apache/coyote/tomcat4 CoyoteRequest.java
  Log:
  Port Jan Luehe's patch to prevent setCharacterEncoding from changing
  the encoding once it's too late.
  
  Revision  Changes    Path
  1.31      +8 -4      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- CoyoteRequest.java        18 Sep 2003 16:13:51 -0000      1.30
  +++ CoyoteRequest.java        20 Nov 2003 16:11:37 -0000      1.31
  @@ -1186,6 +1186,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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to