protected long bytesWritten = 0;
- /**
- * Request body bytes read for the current request.
- */
- protected long bodyBytesRead = 0;
-
-
// ------------------------------------------------------------ Constructor
public AbstractAjpProcessor(int packetSize, AbstractEndpoint endpoint) {
response.recycle();
certificates.recycle();
bytesWritten = 0;
- bodyBytesRead = 0;
}
*/
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)
}
}
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();
+
}
}