costin      02/04/09 11:35:54

  Modified:    http11/src/java/org/apache/coyote/http11 InputFilter.java
                        InternalInputBuffer.java InternalOutputBuffer.java
                        OutputFilter.java
               http11/src/java/org/apache/coyote/http11/filters
                        ChunkedInputFilter.java ChunkedOutputFilter.java
                        IdentityInputFilter.java IdentityOutputFilter.java
                        VoidInputFilter.java VoidOutputFilter.java
  Log:
  Added the second ( unused ) param to doRead/doWrite.
  
  The param is needed only if stateless impl. of Input/OutputBuffer are
  used.
  
  Revision  Changes    Path
  1.5       +1 -1      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InputFilter.java
  
  Index: InputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InputFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InputFilter.java  4 Dec 2001 06:33:06 -0000       1.4
  +++ InputFilter.java  9 Apr 2002 18:35:54 -0000       1.5
  @@ -79,7 +79,7 @@
        * 
        * @return Number of bytes read.
        */
  -    public int doRead(ByteChunk chunk)
  +    public int doRead(ByteChunk chunk, Request unused)
           throws IOException;
   
   
  
  
  
  1.15      +7 -7      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java
  
  Index: InternalInputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- InternalInputBuffer.java  28 Mar 2002 02:34:11 -0000      1.14
  +++ InternalInputBuffer.java  9 Apr 2002 18:35:54 -0000       1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
 1.14 2002/03/28 02:34:11 remm Exp $
  - * $Revision: 1.14 $
  - * $Date: 2002/03/28 02:34:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
 1.15 2002/04/09 18:35:54 costin Exp $
  + * $Revision: 1.15 $
  + * $Date: 2002/04/09 18:35:54 $
    *
    * ====================================================================
    *
  @@ -733,13 +733,13 @@
       /**
        * Read some bytes.
        */
  -    public int doRead(ByteChunk chunk) 
  +    public int doRead(ByteChunk chunk, Request req) 
           throws IOException {
   
           if (lastActiveFilter == -1)
  -            return inputStreamInputBuffer.doRead(chunk);
  +            return inputStreamInputBuffer.doRead(chunk, req);
           else
  -            return activeFilters[lastActiveFilter].doRead(chunk);
  +            return activeFilters[lastActiveFilter].doRead(chunk,req);
   
       }
   
  @@ -800,7 +800,7 @@
           /**
            * Read bytes into the specified chunk.
            */
  -        public int doRead(ByteChunk chunk) 
  +        public int doRead(ByteChunk chunk, Request req ) 
               throws IOException {
   
               if (pos >= lastValid) {
  
  
  
  1.14      +4 -4      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java
  
  Index: InternalOutputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- InternalOutputBuffer.java 9 Apr 2002 18:21:23 -0000       1.13
  +++ InternalOutputBuffer.java 9 Apr 2002 18:35:54 -0000       1.14
  @@ -505,7 +505,7 @@
        * @return number of bytes written
        * @throws IOException an undelying I/O error occured
        */
  -    public int doWrite(ByteChunk chunk) 
  +    public int doWrite(ByteChunk chunk, Response res) 
           throws IOException {
   
           if (!committed) {
  @@ -518,9 +518,9 @@
           }
   
           if (lastActiveFilter == -1)
  -            return outputStreamOutputBuffer.doWrite(chunk);
  +            return outputStreamOutputBuffer.doWrite(chunk, res);
           else
  -            return activeFilters[lastActiveFilter].doWrite(chunk);
  +            return activeFilters[lastActiveFilter].doWrite(chunk, res);
   
       }
   
  @@ -646,7 +646,7 @@
           /**
            * Write chunk.
            */
  -        public int doWrite(ByteChunk chunk) 
  +        public int doWrite(ByteChunk chunk, Response res) 
               throws IOException {
   
               outputStream.write(chunk.getBuffer(), chunk.getStart(), 
  
  
  
  1.5       +1 -1      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/OutputFilter.java
  
  Index: OutputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/OutputFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OutputFilter.java 4 Dec 2001 06:33:06 -0000       1.4
  +++ OutputFilter.java 9 Apr 2002 18:35:54 -0000       1.5
  @@ -79,7 +79,7 @@
        * 
        * @return number of bytes written by the filter
        */
  -    public int doWrite(ByteChunk chunk)
  +    public int doWrite(ByteChunk chunk, Response unused)
           throws IOException;
   
   
  
  
  
  1.3       +3 -3      
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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChunkedInputFilter.java   14 Jan 2002 00:17:58 -0000      1.2
  +++ ChunkedInputFilter.java   9 Apr 2002 18:35:54 -0000       1.3
  @@ -152,7 +152,7 @@
        * whichever is greater. If the filter does not do request body length
        * control, the returned value should be -1.
        */
  -    public int doRead(ByteChunk chunk)
  +    public int doRead(ByteChunk chunk, Request req)
           throws IOException {
   
           if (endChunk)
  @@ -208,7 +208,7 @@
           throws IOException {
   
           // Consume extra bytes : parse the stream until the end chunk is found
  -        while (doRead(readChunk) >= 0) {
  +        while (doRead(readChunk, null) >= 0) {
           }
   
           // Return the number of extra bytes which were consumed
  @@ -254,7 +254,7 @@
       protected int readBytes()
           throws IOException {
   
  -        int nRead = buffer.doRead(readChunk);
  +        int nRead = buffer.doRead(readChunk, null);
           pos = readChunk.getStart();
           lastValid = readChunk.getEnd();
           buf = readChunk.getBytes();
  
  
  
  1.4       +5 -5      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
  
  Index: ChunkedOutputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ChunkedOutputFilter.java  10 Jan 2002 15:37:47 -0000      1.3
  +++ ChunkedOutputFilter.java  9 Apr 2002 18:35:54 -0000       1.4
  @@ -145,7 +145,7 @@
        * 
        * @return number of bytes written by the filter
        */
  -    public int doWrite(ByteChunk chunk)
  +    public int doWrite(ByteChunk chunk, Response res)
           throws IOException {
   
           int result = chunk.getLength();
  @@ -163,12 +163,12 @@
               chunkLength[pos--] = HexUtils.HEX[digit];
           }
           chunkHeader.setBytes(chunkLength, pos + 1, 9 - pos);
  -        buffer.doWrite(chunkHeader);
  +        buffer.doWrite(chunkHeader, res);
   
  -        buffer.doWrite(chunk);
  +        buffer.doWrite(chunk, res);
   
           chunkHeader.setBytes(chunkLength, 8, 2);
  -        buffer.doWrite(chunkHeader);
  +        buffer.doWrite(chunkHeader, res);
   
           return result;
   
  @@ -203,7 +203,7 @@
           throws IOException {
   
           // Write end chunk
  -        buffer.doWrite(END_CHUNK);
  +        buffer.doWrite(END_CHUNK, null);
           
           return 0;
   
  
  
  
  1.9       +3 -3      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/IdentityInputFilter.java
  
  Index: IdentityInputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/IdentityInputFilter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- IdentityInputFilter.java  9 Mar 2002 05:20:03 -0000       1.8
  +++ IdentityInputFilter.java  9 Apr 2002 18:35:54 -0000       1.9
  @@ -148,14 +148,14 @@
        * whichever is greater. If the filter does not do request body length
        * control, the returned value should be -1.
        */
  -    public int doRead(ByteChunk chunk)
  +    public int doRead(ByteChunk chunk, Request req)
           throws IOException {
   
           int result = -1;
   
           if (contentLength >= 0) {
               if (remaining > 0) {
  -                int nRead = buffer.doRead(chunk);
  +                int nRead = buffer.doRead(chunk, req);
                   if (nRead > remaining) {
                       // The chunk is longer than the number of bytes remaining
                       // in the body; changing the chunk length to the number
  @@ -200,7 +200,7 @@
   
           // Consume extra bytes.
           while (remaining > 0) {
  -            remaining = remaining - buffer.doRead(endChunk);
  +            remaining = remaining - buffer.doRead(endChunk, null);
           }
   
           // If too many bytes were read, return the amount.
  
  
  
  1.6       +3 -3      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java
  
  Index: IdentityOutputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IdentityOutputFilter.java 9 Mar 2002 05:20:03 -0000       1.5
  +++ IdentityOutputFilter.java 9 Apr 2002 18:35:54 -0000       1.6
  @@ -138,7 +138,7 @@
        * 
        * @return number of bytes written by the filter
        */
  -    public int doWrite(ByteChunk chunk)
  +    public int doWrite(ByteChunk chunk, Response res)
           throws IOException {
   
           int result = -1;
  @@ -157,7 +157,7 @@
                   } else {
                       remaining = remaining - result;
                   }
  -                buffer.doWrite(chunk);
  +                buffer.doWrite(chunk, res);
               } else {
                   // No more bytes left to be written : return -1 and clear the 
                   // buffer
  @@ -166,7 +166,7 @@
               }
           } else {
               // If no content length was set, just write the bytes
  -            buffer.doWrite(chunk);
  +            buffer.doWrite(chunk, res);
               result = chunk.getLength();
           }
   
  
  
  
  1.2       +1 -1      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/VoidInputFilter.java
  
  Index: VoidInputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/VoidInputFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VoidInputFilter.java      9 Jan 2002 12:57:49 -0000       1.1
  +++ VoidInputFilter.java      9 Apr 2002 18:35:54 -0000       1.2
  @@ -102,7 +102,7 @@
        * 
        * @return number of bytes written by the filter
        */
  -    public int doRead(ByteChunk chunk)
  +    public int doRead(ByteChunk chunk, Request req)
           throws IOException {
   
           return -1;
  
  
  
  1.2       +1 -1      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/VoidOutputFilter.java
  
  Index: VoidOutputFilter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/VoidOutputFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VoidOutputFilter.java     4 Dec 2001 06:33:07 -0000       1.1
  +++ VoidOutputFilter.java     9 Apr 2002 18:35:54 -0000       1.2
  @@ -108,7 +108,7 @@
        * 
        * @return number of bytes written by the filter
        */
  -    public int doWrite(ByteChunk chunk)
  +    public int doWrite(ByteChunk chunk, Response res)
           throws IOException {
   
           return chunk.getLength();
  
  
  

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

Reply via email to