Author: remy.maucherat(a)jboss.com
Date: 2008-02-27 11:17:46 -0500 (Wed, 27 Feb 2008)
New Revision: 452
Modified:
trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
Log:
- Fix buffer handling error.
Modified: trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2008-02-27 14:31:04
UTC (rev 451)
+++ trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2008-02-27 16:17:46
UTC (rev 452)
@@ -787,10 +787,13 @@
// of the write is 0
int pos = 0;
int end = bbuf.position();
- res = Socket.sendibb(socket, 0, bbuf.position());
- while (res > 0 && pos < end) {
- pos += res;
+ while (pos < end) {
res = Socket.sendibb(socket, pos, bbuf.position());
+ if (res > 0) {
+ pos += res;
+ } else {
+ break;
+ }
}
// Put any leftover bytes in the leftover byte chunk
if (pos < end) {
Show replies by date