Author: markt Date: Fri Sep 2 11:43:52 2011 New Revision: 1164488 URL: http://svn.apache.org/viewvc?rev=1164488&view=rev Log: * 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. (kkolinko)
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1164488&r1=1164487&r2=1164488&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Sep 2 11:43:52 2011 @@ -107,11 +107,3 @@ PATCHES PROPOSED TO BACKPORT: never used, so cannot say whether consuming terminating '\0' is needed like in #doGetBytes(). -1: - -* 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=27438 - +1: kkolinko, markt, kfujino - -1: Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1164488&r1=1164487&r2=1164488&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Fri Sep 2 11:43:52 2011 @@ -794,6 +794,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/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1164488&r1=1164487&r2=1164488&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Sep 2 11:43:52 2011 @@ -55,6 +55,11 @@ <subsection name="Coyote"> <changelog> <fix> + <bug>50394</bug>: Return -1 from read operation instead of throwing an + exception when encountering an EOF with the HTTP APR connector. + (kkolinko) + </fix> + <fix> <bug>51698</bug>: Fix CVE-2011-3190. Prevent AJP message injection. (markt) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org