Author: jim Date: Fri Sep 16 17:24:44 2011 New Revision: 1171684 URL: http://svn.apache.org/viewvc?rev=1171684&view=rev Log: Return -1 from read operation instead of throwing an exception when encountering an EOF with the HTTP APR connector.
Modified: tomcat/tc5.5.x/trunk/STATUS.txt tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Modified: tomcat/tc5.5.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1171684&r1=1171683&r2=1171684&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Sep 16 17:24:44 2011 @@ -24,13 +24,6 @@ $Id$ PATCHES ACCEPTED TO BACKPORT FROM TRUNK/OTHER: [ start all new proposals below, under PATCHES PROPOSED. ] -* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50394 - Return -1 from read operation instead of throwing an exception when - encountering an EOF with the HTTP APR connector. - Native 1.1.22 is required for this fix. - https://issues.apache.org/bugzilla/attachment.cgi?id=27437 - +1: kkolinko, markt, jim - -1: PATCHES PROPOSED TO BACKPORT: [ New proposals should be added at the end of the list ] Modified: tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1171684&r1=1171683&r2=1171684&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/tc5.5.x/trunk/connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java Fri Sep 16 17:24:44 2011 @@ -860,6 +860,9 @@ public class InternalAprInputBuffer impl } else { if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { throw new SocketTimeoutException(sm.getString("iib.failedread")); + } else if (nRead == 0) { + // APR_STATUS_IS_EOF, since native 1.1.22 + return false; } else { throw new IOException(sm.getString("iib.failedread")); } Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=1171684&r1=1171683&r2=1171684&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original) +++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Fri Sep 16 17:24:44 2011 @@ -42,8 +42,12 @@ <section name="Tomcat 5.5.34 (jim)" rtext=""> <subsection name="General"> <changelog> + <fix> + <bug>50394</bug>Return -1 from read operation instead of throwing an exception when + encountering an EOF with the HTTP APR connector. + </fix> <update> - Update Tomcat-Native to 1.1.22. + Update Tomcat-Native to 1.1.22. (jim) </update> <fix> Align jpda settings with catalina.sh, tc6.0.x, tc7.0.x and trunk --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org