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/http HttpResponseStream.java
Date Wed, 14 Mar 2001 19:18:21 GMT
remm        01/03/14 11:18:20

  Modified:    catalina/src/share/org/apache/catalina/connector/http
                        HttpResponseStream.java
  Log:
  - An end chunk could be printed in the middle of a response if
    write(byte[] b, int off, int len) was called with len = 0.
  
  Revision  Changes    Path
  1.6       +10 -8     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java
  
  Index: HttpResponseStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HttpResponseStream.java	2001/03/08 23:55:36	1.5
  +++ HttpResponseStream.java	2001/03/14 19:18:18	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v
1.5 2001/03/08 23:55:36 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/03/08 23:55:36 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v
1.6 2001/03/14 19:18:18 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/03/14 19:18:18 $
    *
    * ====================================================================
    * 
  @@ -149,11 +149,13 @@
       public void write(byte[] b, int off, int len)
           throws IOException {
           if (useChunking && !writingChunk) {
  -            writingChunk = true;
  -            println(Integer.toHexString(len));
  -            super.write(b, off, len);
  -            println();
  -            writingChunk = false;
  +            if (len > 0) {
  +                writingChunk = true;
  +                println(Integer.toHexString(len));
  +                super.write(b, off, len);
  +                println();
  +                writingChunk = false;
  +            }
           } else {
               super.write(b, off, len);
           }
  
  
  

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


Mime
View raw message