Details
Description
Using the Servlet 3.0 suspend/resume feature, doing a suspend of a POST containing a content-length and an "application/octet-stream" in the request body will result in a second resume after the response is committed.
This occurs if the length indicated by the content-length is read from the stream. Reading the request input stream until EOF will prevent the extra resume from occurring, but reading until EOF is not normally something you should do in a servlet (may block on some containers).
not sure I 100% follow what you are doing.
A unit test or code snippet would be valuable in communicating what you are doing.
It would be useful to know if the suspend is happening before, during or after the read of the content?
Note that the blocking read is not something that suspend/resume is trying to address. There are other
async IO features being considered for servlet 3.0 that would be better for doing asynchronous IO.
Typically a suspend is useful for an application event, rather than an IO event, and will take place before
or after consuming the POST content.