https://bz.apache.org/bugzilla/show_bug.cgi?id=60718
Bug ID: 60718
Summary: requestDestroyed not called for asynchronous after I/O
error
Product: Tomcat 8
Version: 8.5.11
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ----
Sequence of events:
1. Servlet "synchronously" writes an async response: ac = req.startAsync(); try
{ resp.getOutputStream().write(new byte[1024*1024]); } finally { ac.complete();
}
2. Client disconnects to force broken pipe (etc.): uc = new
URL("...").openConnection(); uc.getInputStream().close(); uc.disconnect();
In this case, where ServletRequestListener.requestInitialized is called.
Summary of scenarios:
- Fail: the servlet writes the response synchronously after startAsync
(described above)
- Fail: In Tomcat 8.5.11, the servlet writes the response truly asynchronously
(with a new Thread)
- Pass: in Tomcat 8.5.6, the servlet writes the response truly asynchronously
(with a new Thread)
- Pass: the servlet writes the response truly synchronously (without
startAsync)
- Pass: the client reads the stream without disconnecting early (all Tomcat
versions, regardless of other scenarios presented).
I think requestDestroyed should always be called.
--
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]