Author: rjung Date: Fri Dec 11 20:46:33 2015 New Revision: 1719543 URL: http://svn.apache.org/viewvc?rev=1719543&view=rev Log: Apache: Don't try to read remaining request body parts during clean up if reading the request body from the client already failed during earlier processing phases.
Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c tomcat/jk/trunk/native/apache-2.0/mod_jk.c tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Modified: tomcat/jk/trunk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-1.3/mod_jk.c?rev=1719543&r1=1719542&r2=1719543&view=diff ============================================================================== --- tomcat/jk/trunk/native/apache-1.3/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-1.3/mod_jk.c Fri Dec 11 20:46:33 2015 @@ -2682,8 +2682,12 @@ static int jk_handler(request_rec * r) if (worker->get_endpoint(worker, &end, conf->log)) { rc = end->service(end, &s, conf->log, &is_error); end->done(&end, conf->log); - if (s.content_read < s.content_length || - (s.is_chunked && !s.no_more_chunks)) { + if ((s.content_read < s.content_length || + (s.is_chunked && !s.no_more_chunks)) && + /* This case aborts the connection below and typically + * means the request body reading already timed out, + * so lets not try to read again here. */ + !(rc == JK_CLIENT_ERROR && is_error == HTTP_BAD_REQUEST)) { /* * If the servlet engine didn't consume all of the * request data, consume and discard all further Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1719543&r1=1719542&r2=1719543&view=diff ============================================================================== --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Fri Dec 11 20:46:33 2015 @@ -2900,8 +2900,12 @@ static int jk_handler(request_rec * r) rc = end->service(end, &s, xconf->log, &is_error); end->done(&end, xconf->log); - if (s.content_read < s.content_length || - (s.is_chunked && !s.no_more_chunks)) { + if ((s.content_read < s.content_length || + (s.is_chunked && !s.no_more_chunks)) && + /* This case aborts the connection below and typically + * means the request body reading already timed out, + * so lets not try to read again here. */ + !(rc == JK_CLIENT_ERROR && is_error == HTTP_BAD_REQUEST)) { /* * If the servlet engine didn't consume all of the * request data, consume and discard all further Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1719543&r1=1719542&r2=1719543&view=diff ============================================================================== --- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Fri Dec 11 20:46:33 2015 @@ -45,6 +45,11 @@ <subsection name="Native"> <changelog> <fix> + Apache: Don't try to read remaining request body parts during + clean up if reading the request body from the client already + failed during earlier processing phases. (rjung) + </fix> + <fix> <bug>57836</bug>: ISAPI: Empty REMOTE_USER should not be translated to "". (rjung) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org