https://bz.apache.org/bugzilla/show_bug.cgi?id=59261

            Bug ID: 59261
           Summary: Request getAsyncContext should throw
                    IllegalStateException if async is not started
           Product: Tomcat 8
           Version: 8.0.33
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: rwi...@gmail.com

If ServletRequest.getAsyncContext() IllegalStateException is invoked and has
not been put into asynchronous mode an . From the javadoc [1]:

> Throws: IllegalStateException - if this request has not been put into
> asynchronous mode, i.e., if neither startAsync() nor 
> startAsync(ServletRequest,ServletResponse) has been called

For implementations of HttpServletRequestWrapper that override this method, the
fact that result can be null can cause problems [2]. It appears there are parts
of tomcat that check if getAsyncContext() is null rather than checking
isAsycStarted(). For example, ApplicationDispatcher checks if getAsyncContext()
is null.


[1]
http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getAsyncContext()
[2] https://github.com/spring-cloud/spring-cloud-netflix/issues/868

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to