Improve fix for PR50394 Requires native 1.1.21
authorjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 20 Jul 2011 15:28:05 +0000 (15:28 +0000)
committerjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 20 Jul 2011 15:28:05 +0000 (15:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1148815 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/InternalAprInputBuffer.java

index 8c665b0..8c30245 100644 (file)
@@ -587,11 +587,9 @@ public class InternalAprInputBuffer extends AbstractInputBuffer {
                 bbuf.get(buf, pos, nRead);
                 lastValid = pos + nRead;
             } else {
-                if ((-nRead) == Status.APR_EOF)
-                    return false;
                 if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) {
                     throw new SocketTimeoutException(sm.getString("iib.failedread"));
-                } else {
+                } else if (nRead != 0) {
                     throw new IOException(sm.getString("iib.failedread"));
                 }
             }