Author: markt Date: Thu Jan 17 22:04:07 2019 New Revision: 1851588 URL: http://svn.apache.org/viewvc?rev=1851588&view=rev Log: Treat I/O errors during request body reads the same way as I/O errors during response body writes. The errors are treated as client side errors rather than server side errors and only logged at debug level.
Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1851588&r1=1851587&r2=1851588&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Jan 17 22:04:07 2019 @@ -332,9 +332,13 @@ public class InputBuffer extends Reader state = BYTE_STATE; } - int result = coyoteRequest.doRead(this); - - return result; + try { + return coyoteRequest.doRead(this); + } catch (IOException ioe) { + // An IOException on a read is almost always due to + // the remote client aborting the request. + throw new ClientAbortException(ioe); + } } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1851588&r1=1851587&r2=1851588&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Jan 17 22:04:07 2019 @@ -92,6 +92,12 @@ Utility thread count for special negative or zero values will again be based on Runtime.getRuntime().availableProcessors(). (remm) </fix> + <scode> + Treat I/O errors during request body reads the same way as I/O errors + during response body writes. The errors are treated as client side + errors rather than server side errors and only logged at debug level. + (markt) + </scode> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org