Author: yoavs
Date: Sun Mar 25 09:20:23 2007
New Revision: 522295

URL: http://svn.apache.org/viewvc?view=rev&rev=522295
Log:
Bugzilla 40960: throw SocketTimeoutException, not parent IOException, if a 
socket timeout ocurs, in InternalAprInputBuffer.

Modified:
    
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java?view=diff&rev=522295&r1=522294&r2=522295
==============================================================================
--- 
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java
 (original)
+++ 
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java
 Sun Mar 25 09:20:23 2007
@@ -20,6 +20,7 @@
 
 import java.io.IOException;
 import java.io.EOFException;
+import java.net.SocketTimeoutException;
 import java.nio.ByteBuffer;
 
 import org.apache.tomcat.jni.Socket;
@@ -822,7 +823,11 @@
                 bbuf.get(buf, 0, nRead);
                 lastValid = nRead;
             } else {
-                throw new IOException(sm.getString("iib.failedread"));
+                if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) 
{
+                    throw new 
SocketTimeoutException(sm.getString("iib.failedread"));
+                } else {
+                    throw new IOException(sm.getString("iib.failedread"));
+                }
             }
 
         }

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=522295&r1=522294&r2=522295
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Mar 25 09:20:23 2007
@@ -41,6 +41,14 @@
       </update>
     </changelog>
   </subsection>
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        <bug>40960</bug> Inconsistent exception type thrown on socket timeout 
in
+          InternalAprInputBuffer.  Patch by Christophe Pierret. (yoavs)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Cluster">
     <changelog>
       <fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to