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

--- Comment #10 from Violeta Georgieva <violet...@apache.org> ---
(In reply to Scott Nicklous from comment #9)
> In the specific case addressed by this bug report, both onTimeout() and
> onComplete() are correctly called as long as the buffer is not flushed. 
> 
> The problem occurs only when the buffer was flushed at least once before the
> timeout occurs. If the buffer was flushed, onTimeout() is called, but
> onComplete() is not.
> 
> If the buffer was  flushed, I don't think Tomcat can set the status code or
> do an error dispatch anymore. But it would be nice if onComplete() would be
> called after the onTimeout() anyway.

Actually it will as it is required by the spec

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

"GET /AsyncDebugListener/ltest?reps=3&timeout&flush HTTP/1.1" 500 642
"GET /AsyncDebugListener/ltest?reps=3&timeout HTTP/1.1" 500 624

This is what I will receive in the http access code with your example.

Regards,
Violeta

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