On 29/10/2014 18:11, Mark Thomas wrote: > On 29/10/2014 17:29, [email protected] wrote: >> Author: remm >> Date: Wed Oct 29 17:29:19 2014 >> New Revision: 1635215 >> >> URL: http://svn.apache.org/r1635215 >> Log: >> Fix three edgy async context bugs. >> >> Modified: >> tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java >> tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java >> tomcat/trunk/webapps/docs/changelog.xml >> >> Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1635215&r1=1635214&r2=1635215&view=diff >> ============================================================================== >> --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java >> (original) >> +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Wed Oct >> 29 17:29:19 2014 >> @@ -84,7 +84,6 @@ public class AsyncContextImpl implements >> } >> check(); >> request.getCoyoteRequest().action(ActionCode.ASYNC_COMPLETE, null); >> - clearServletRequestResponse(); >> } >> >> @Override >> @@ -104,6 +103,7 @@ public class AsyncContextImpl implements >> } >> } >> } finally { >> + clearServletRequestResponse(); >> context.unbind(Globals.IS_SECURITY_ENABLED, oldCL); >> } >> >> @@ -290,6 +290,10 @@ public class AsyncContextImpl implements >> } catch (ClassNotFoundException e) { >> ServletException se = new ServletException(e); >> throw se; >> + } catch (Exception e) { >> + ExceptionUtils.handleThrowable(e.getCause()); >> + ServletException se = new ServletException(e); >> + throw se; > > -1 (veto) > > The Servlet 3.1 specification requires that an IllegalStateException is > thrown if get[Request|Response]() is called after complete(). > > There are unit tests for this that now fail. > > Please revert this ASAP before it starts to block the 8.0.15 tag.
Hmm. I withdraw that veto. This change has no impact on the failing test. I need to investigate further. (It is odd though how we are now seeing a ServletException where there should be an ISE). Mark > Mark > >> } >> return listener; >> } >> >> Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1635215&r1=1635214&r2=1635215&view=diff >> ============================================================================== >> --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] >> (original) >> +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed >> Oct 29 17:29:19 2014 >> @@ -109,7 +109,7 @@ public class AsyncStateMachine { >> DISPATCHED(false, false, false), >> STARTING(true, true, false), >> STARTED(true, true, false), >> - MUST_COMPLETE(true, false, false), >> + MUST_COMPLETE(true, true, false), >> COMPLETING(true, false, false), >> TIMING_OUT(true, false, false), >> MUST_DISPATCH(true, true, true), >> >> Modified: tomcat/trunk/webapps/docs/changelog.xml >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1635215&r1=1635214&r2=1635215&view=diff >> ============================================================================== >> --- tomcat/trunk/webapps/docs/changelog.xml (original) >> +++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 29 17:29:19 2014 >> @@ -183,6 +183,13 @@ >> full class path, ensure that class path entries added directly to >> the >> web application class loader are scanned. (markt) >> </fix> >> + <fix> >> + AsyncContext should remain usable until fireOnComplete is called. >> (remm) >> + </fix> >> + <fix> >> + AsyncContext createListener should wrap any instantiation exception >> + using a ServletException. (remm) >> + </fix> >> </changelog> >> </subsection> >> <subsection name="Coyote"> >> @@ -219,6 +226,9 @@ >> <code>AsyncContext.start(Runnable)</code> during non-blocking IO >> reads >> and writes. (markt) >> </fix> >> + <fix> >> + Async state MUST_COMPLETE should still be started. (remm) >> + </fix> >> </changelog> >> </subsection> >> <subsection name="Jasper"> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
