tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1161540 - /tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
Date Thu, 25 Aug 2011 12:30:22 GMT
Author: markt
Date: Thu Aug 25 12:30:22 2011
New Revision: 1161540

URL: http://svn.apache.org/viewvc?rev=1161540&view=rev
Log:
Revert r1160772 & r1160774.
These changes turned out to be unnecessary.

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1161540&r1=1161539&r2=1161540&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Thu Aug 25 12:30:22
2011
@@ -225,12 +225,6 @@ public abstract class AbstractAjpProcess
     protected long bytesWritten = 0;
 
 
-    /**
-     * Request body bytes read for the current request.
-     */
-    protected long bodyBytesRead = 0;
-
-
     // ------------------------------------------------------------ Constructor
 
     public AbstractAjpProcessor(int packetSize, AbstractEndpoint endpoint) {
@@ -536,7 +530,6 @@ public abstract class AbstractAjpProcess
         response.recycle();
         certificates.recycle();
         bytesWritten = 0;
-        bodyBytesRead = 0;
     }
 
 
@@ -1010,9 +1003,9 @@ public abstract class AbstractAjpProcess
      */
     protected class SocketInputBuffer implements InputBuffer {
 
+
         /**
-         * Read bytes into the specified chunk. If no chunk is specified, the
-         * bytes are swallowed.
+         * Read bytes into the specified chunk.
          */
         @Override
         public int doRead(ByteChunk chunk, Request req)
@@ -1032,12 +1025,10 @@ public abstract class AbstractAjpProcess
                 }
             }
             ByteChunk bc = bodyBytes.getByteChunk();
-            bodyBytesRead += bc.getLength();
-            if (chunk != null) {
-                chunk.setBytes(bc.getBuffer(), bc.getStart(), bc.getLength());
-            }
+            chunk.setBytes(bc.getBuffer(), bc.getStart(), bc.getLength());
             empty = true;
-            return bc.getLength();
+            return chunk.getLength();
+
         }
 
     }



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


Mime
View raw message