tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r528570 - /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Date Fri, 13 Apr 2007 18:08:44 GMT
Author: fhanik
Date: Fri Apr 13 11:08:43 2007
New Revision: 528570

URL: http://svn.apache.org/viewvc?view=rev&rev=528570
Log:
Use the remaining for the byte buffer as the capacity is the total capacity and not the limit

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?view=diff&rev=528570&r1=528569&r2=528570
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Fri Apr
13 11:08:43 2007
@@ -788,8 +788,8 @@
                 if (socket.getBufHandler().getWriteBuffer().position() == socket.getBufHandler().getWriteBuffer().capacity())
{
                     flushBuffer();
                 }
-                if (thisTime > socket.getBufHandler().getWriteBuffer().capacity() - socket.getBufHandler().getWriteBuffer().position())
{
-                    thisTime = socket.getBufHandler().getWriteBuffer().capacity() - socket.getBufHandler().getWriteBuffer().position();
+                if (thisTime > socket.getBufHandler().getWriteBuffer().remaining()) {
+                    thisTime = socket.getBufHandler().getWriteBuffer().remaining();
                 }
                 addToBB(b,start,thisTime);
                 len = len - thisTime;



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


Mime
View raw message