You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/11/09 11:30:48 UTC
[Bug 54123] New: servlet 3.0 spec violation in async timeout
processing
https://issues.apache.org/bugzilla/show_bug.cgi?id=54123
Priority: P2
Bug ID: 54123
Assignee: dev@tomcat.apache.org
Summary: servlet 3.0 spec violation in async timeout processing
Severity: major
Classification: Unclassified
OS: Linux
Reporter: bluewolf.chung@gmail.com
Hardware: PC
Status: NEW
Version: trunk
Component: Catalina
Product: Tomcat 7
Created attachment 29575
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29575&action=edit
test war file within java source
Servlet 3.0 Spec. says that
2.3.3.3 Asynchronous processing
...
In the event that an asynchronous operation times out, the container must run
through the following steps:
■ Invoke the AsyncListener.onTimeout method on all the AsyncListener
instances registered with the ServletRequest on which the asynchronous
operation was initiated.
■ If none of the listeners called AsyncContext.complete() or any of the
AsyncContext.dispatch methods, perform an error dispatch with a status
code equal to HttpServletResponse.SC_INTERNAL_SERVER_ERROR.
■ If no matching error page was found, or the error page did not call
AsyncContext.complete() or any of the AsyncContext.dispatch
methods, the container MUST call AsyncContext.complete().
(servlet-3_0-mrel-spec.pdf / pdf page 40, Spec page 18)
In other words, if there are no AsyncListeners which calls
AsyncContext.complete() or any of the
AsyncContext.dispatch, the container must perform an error dispatch with 500
error code.
But tomcat 7 does not send 500 error response. It sends 200 OK.
In org.apache.catalina.core.AsyncContextImpl.timeout(),
if (listenerInvoked) {
request.getCoyoteRequest().action(
ActionCode.ASYNC_IS_TIMINGOUT, result);
return !result.get();
} else {
// No listeners, container calls complete
complete();
}
it just calls complete(). So I think it must be spec violation.
I've attached the test war file within a test source.
Test URL is http://localhost:8080/asyncTimeoutTest/AsyncTimeoutTestServlet .
--
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
[Bug 54123] servlet 3.0 spec violation in async timeout processing
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54123
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Fixed in trunk and 7.0.x and will be included in 7.0.33 onwards.
"error dispatch" is not defined anywhere I could find in the servlet spec. I
implemented based on what I could deduce from the spec text quoted in this
issue.
--
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
[Bug 54123] servlet 3.0 spec violation in async timeout processing
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54123
--- Comment #2 from Eugene Chung (TmaxSoft) <bl...@gmail.com> ---
Yes, I haven't seen the def. of 'error dispatch', too. In our product, I just
used response.sendError(500) that was internally using forward with
DispatcherType.ERROR.
--
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