You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ji...@apache.org on 2011/09/16 19:24:44 UTC

svn commit: r1171684 - in /tomcat/tc5.5.x/trunk: STATUS.txt connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java container/webapps/docs/changelog.xml

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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1171684 - in /tomcat/tc5.5.x/trunk: STATUS.txt connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java container/webapps/docs/changelog.xml

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/9/17 Rainer Jung <ra...@kippdata.de>:
> On 16.09.2011 19:24, jim@apache.org wrote:
>> 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
>>
>> --- 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:
>
> Does "Native 1.1.22 is required for this fix." mean "required for a
> complete fix" or "required in order to not introduce another bug"? We
> only updated "recommended" to 1.1.22, not "required", which would be OK
> only in the first case.

It is the first. The added code is executed only when running with
native 1.1.22 and later.

Returning 0 was implemented in native 1.1.22 (r1148814).

Native 1.1.20 will return an error code (the one that signals the EOF)
and Java side will throw new
IOException(sm.getString("iib.failedread"));

Best regards,
Konstantin Kolinko

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


Re: svn commit: r1171684 - in /tomcat/tc5.5.x/trunk: STATUS.txt connectors/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java container/webapps/docs/changelog.xml

Posted by Rainer Jung <ra...@kippdata.de>.
On 16.09.2011 19:24, jim@apache.org wrote:
> 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:

Does "Native 1.1.22 is required for this fix." mean "required for a
complete fix" or "required in order to not introduce another bug"? We
only updated "recommended" to 1.1.22, not "required", which would be OK
only in the first case.

Regards,

Rainer


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