remm        02/05/23 13:30:49

  Modified:    http11/src/java/org/apache/coyote/http11/filters
                        ChunkedInputFilter.java
  Log:
  - In the case where the amount of data read was smaller than the total length
    of the chunk, the position in the buffer was not updated, thus causing the same 
data
    to be read again (however, the correct amount of bytes would be read).
  - This could fix bug 9353.
  
  Revision  Changes    Path
  1.4       +2 -1      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
  
  Index: ChunkedInputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ChunkedInputFilter.java   9 Apr 2002 18:35:54 -0000       1.3
  +++ ChunkedInputFilter.java   23 May 2002 20:30:49 -0000      1.4
  @@ -178,6 +178,7 @@
               result = lastValid - pos;
               remaining = remaining - result;
               chunk.setBytes(buf, pos, result);
  +            pos = lastValid;
           } else {
               result = remaining;
               chunk.setBytes(buf, pos, remaining);
  @@ -256,7 +257,7 @@
   
           int nRead = buffer.doRead(readChunk, null);
           pos = readChunk.getStart();
  -        lastValid = readChunk.getEnd();
  +        lastValid = pos + nRead;
           buf = readChunk.getBytes();
   
           return nRead;
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to