https://issues.apache.org/bugzilla/show_bug.cgi?id=51197
Bug #: 51197
Summary: sendError/sendRedirect don't work with AsyncContext
Product: Tomcat 7
Version: 7.0.14
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: Servlet & JSP API
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
For some reason, response.sendRedirect and response.sendError are not producing
expected behavior when using an AsyncContext. On the server side, the async
request completes normally, and everything looks hunky dory, but the client
never gets ANY response from the server. It appears that Tomcat simply times
out after the default 10 seconds and closes the connection. No headers are
returned, no content, nothing. I've confirmed with thread dumps that the
server isn't stuck.
Yet...if you use response.setStatus and response.setHeader instead, it works
absolutely fine. The client gets the response every time.
I put together a very simple test that isolates the issue reliably:
https://github.com/dcheckoway/async-test
See the README in there for details.
NOTE: the behavior for sendError changed slightly from 7.0.12 to 7.0.14. As of
7.0.14, sendError seems to close the connection immediately, but the client
still never gets any response of any kind.
--
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: [email protected]
For additional commands, e-mail: [email protected]