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

--- Comment #3 from Jonathan <jonathan.kee...@gmail.com> ---
I have attached two classes as part of a spring boot demo to show an issue we
are running into. (Would have attached whole war but for file size limit,
please contact if you would like it.)

With a simple Spring MVC controller using Springs DeferredResult object and
Servlet 3.1 asynchronous requests, there is an issue whereby if an error occurs
in the onDataAvailable() method and the onError() method is called, the error
response is never returned to the user.

With Jetty the exact same code returns the error response message and a HTTP
status code.

I have tried to look through both the Jetty code and Tomcat code to see where
the difference may lie and unfortunately it is unclear to me. The actual
dispatching of the async request seems to happen similarly in both containers
in that the Async state is set to DISPATCHING etc. but when the responses are
returned to the WebAsyncManager that Spring is using to
setConcurrentResultAndDispatch() that the problem appears to occur. I tried to
follow the code path but once the tomcat demo goes into NioEndPoint.class, its
here that the response is completely severed.

This issue does not occur if returning normal responses from a Spring
Controller, only when using DeferredResults.

-- 
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