Author: markt Date: Thu Jun 30 12:21:02 2016 New Revision: 1750788 URL: http://svn.apache.org/viewvc?rev=1750788&view=rev Log: Simplify. Re-use existing method rather than duplicating it.
Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1750788&r1=1750787&r2=1750788&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Thu Jun 30 12:21:02 2016 @@ -775,12 +775,8 @@ public class Request implements HttpServ * @exception IOException if an input/output error occurs */ public void finishRequest() throws IOException { - // Optionally disable swallowing of additional request data. - Context context = getContext(); - if (context != null && - response.getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE && - !context.getSwallowAbortedUploads()) { - coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null); + if (response.getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE) { + checkSwallowInput(); } } @@ -2640,7 +2636,9 @@ public class Request implements HttpServ /** - * Disable swallowing of remaining input if configured + * Check the configuration for aborted uploads and if configured to do so, + * disable the swallowing of any remaining input and close the connection + * once the response has been written. */ protected void checkSwallowInput() { Context context = getContext(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org