You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/08/14 11:36:34 UTC
svn commit: r1513783 -
/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Author: markt
Date: Wed Aug 14 09:36:34 2013
New Revision: 1513783
URL: http://svn.apache.org/r1513783
Log:
Async read/write errors need to trigger error responses so the socket is closed.
Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1513783&r1=1513782&r2=1513783&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Wed Aug 14 09:36:34 2013
@@ -305,7 +305,10 @@ public class CoyoteAdapter implements Ad
asyncConImpl.setErrorState(null, false);
}
} else if (status==SocketStatus.ASYNC_READ_ERROR) {
- success = true;
+ // A async read error is an IO error which means the socket
+ // needs to be closed so set success to false to trigger a
+ // close
+ success = false;
Throwable t = (Throwable)req.getAttribute(
RequestDispatcher.ERROR_EXCEPTION);
req.getAttributes().remove(RequestDispatcher.ERROR_EXCEPTION);
@@ -325,7 +328,10 @@ public class CoyoteAdapter implements Ad
asyncConImpl.setErrorState(t, true);
}
} else if (status==SocketStatus.ASYNC_WRITE_ERROR) {
- success = true;
+ // A async write error is an IO error which means the socket
+ // needs to be closed so set success to false to trigger a
+ // close
+ success = false;
Throwable t = (Throwable)req.getAttribute(
RequestDispatcher.ERROR_EXCEPTION);
req.getAttributes().remove(RequestDispatcher.ERROR_EXCEPTION);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org