tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49528] New: HttpServletRequest.isAsyncStarted() returns false when a Runnable is started
Date Wed, 30 Jun 2010 10:32:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49528

           Summary: HttpServletRequest.isAsyncStarted() returns false when
                    a Runnable is started
           Product: Tomcat 7
           Version: 7.0.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: pieter@emweb.be


Created an attachment (id=25667)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25667)
Servlet 3.0 isAsyncStarted testcase

In the attached example, an async request is created, but within a Runnable
started using AsyncContext.start() the isAsyncStarted() returns false. 

This conflicts with the servlet 3.0 specification. Quoting chapter "2.3.3.3
Asynchronous processing" : "
  public boolean isAsyncStarted() - Returns true if async processing
  has started on this request, and false otherwise. If this request has been
  dispatched using one of the AsyncContext.dispatch methods since it was
  put in asynchronous mode, or a call to AsynContext.complete is made, this
  method returns false.
"

This output is generated by Tomcat 7.0.0:

Start async()
Dispatching start()
request.isAsyncStarted()1true
Returning from doGet()
request.isAsyncStarted()2false
Before sleep()
After sleep()
request.isAsyncStarted()3false
Returning from run()
request.isAsyncStarted()4false

The following output is what we would expect and what Jetty v8.0 generates:

Start async()
Dispatching start()
request.isAsyncStarted()1true
Returning from doGet()
request.isAsyncStarted()2true
Before sleep()
After sleep()
request.isAsyncStarted()3true
Returning from run()
request.isAsyncStarted()4false

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message