remm        2002/11/11 03:01:05

  Modified:    coyote/src/java/org/apache/coyote/tomcat4
                        CoyoteResponse.java OutputBuffer.java
               coyote/src/java/org/apache/coyote/tomcat5
                        CoyoteResponse.java OutputBuffer.java
  Log:
  - Properly compute the size of the content sent (previously, only the bytes
    were counted).
  - Fix bug 14281.
  - Patch submitted by Eloy Lafuente <stronk7 at si.unirioja.es>
  
  Revision  Changes    Path
  1.29      +5 -5      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- CoyoteResponse.java       6 Nov 2002 09:26:42 -0000       1.28
  +++ CoyoteResponse.java       11 Nov 2002 11:01:04 -0000      1.29
  @@ -330,7 +330,7 @@
        * Return the number of bytes actually written to the output stream.
        */
       public int getContentCount() {
  -        return outputBuffer.getBytesWritten();
  +        return outputBuffer.getContentWritten();
       }
   
   
  
  
  
  1.9       +5 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/OutputBuffer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- OutputBuffer.java 6 Nov 2002 09:26:42 -0000       1.8
  +++ OutputBuffer.java 11 Nov 2002 11:01:04 -0000      1.9
  @@ -639,6 +639,11 @@
       }
   
   
  +    public int getContentWritten() {
  +        return bytesWritten + charsWritten;
  +    }
  +
  +
       /** 
        * True if this buffer hasn't been used ( since recycle() ) -
        * i.e. no chars or bytes have been added to the buffer.  
  
  
  
  1.11      +5 -5      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CoyoteResponse.java       5 Nov 2002 18:44:55 -0000       1.10
  +++ CoyoteResponse.java       11 Nov 2002 11:01:04 -0000      1.11
  @@ -330,7 +330,7 @@
        * Return the number of bytes actually written to the output stream.
        */
       public int getContentCount() {
  -        return outputBuffer.getBytesWritten();
  +        return outputBuffer.getContentWritten();
       }
   
   
  
  
  
  1.3       +5 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/OutputBuffer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OutputBuffer.java 5 Nov 2002 18:44:55 -0000       1.2
  +++ OutputBuffer.java 11 Nov 2002 11:01:05 -0000      1.3
  @@ -639,6 +639,11 @@
       }
   
   
  +    public int getContentWritten() {
  +        return bytesWritten + charsWritten;
  +    }
  +
  +
       /** 
        * True if this buffer hasn't been used ( since recycle() ) -
        * i.e. no chars or bytes have been added to the buffer.  
  
  
  

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

Reply via email to