costin      01/07/16 20:14:46

  Modified:    src/share/org/apache/tomcat/core OutputBuffer.java
  Log:
  Fix for bug 2646. We need to recycle the encoding. Thanks to Ben Kelley
  for reporting and including a test case.
  
  Revision  Changes    Path
  1.19      +3 -0      
jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/OutputBuffer.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- OutputBuffer.java 2001/06/03 20:16:46     1.18
  +++ OutputBuffer.java 2001/07/17 03:14:46     1.19
  @@ -201,6 +201,8 @@
        if( conv!= null ) {
            conv.recycle();
        }
  +     gotEnc=false;
  +     enc=null;
       }
   
       // -------------------- Adding bytes to the buffer -------------------- 
  @@ -338,6 +340,7 @@
       private void setConverter() {
        if( resp!=null ) 
            enc = resp.getCharacterEncoding();
  +     if( debug > 0 ) log("Got encoding: " + enc );
        gotEnc=true;
        if(enc==null) enc=DEFAULT_ENCODING;
        conv=(C2BConverter)encoders.get(enc);
  
  
  

Reply via email to