clarify request/response methods that can be called asynchronously
- Dominant language
- Java
- Stars
- 325
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
It is unclear from the current specification what request/response methods can be called from another thread when a request is in asynchronous mode (and also when the input/output is in asynchronous mode).
Examples that require clarification include when called by non-container threads include:
ServletResponse.sendError(...)
FilterChain.doFilter(...)
RequestDispatcher.forward(...)
ServletRequest.getParameter(...)
All of these methods may invoke container and/or application code that assumes blocking IO, so if for example the input stream has been put into async IO mode and getParameter is called, will the request body be correctly consumed?
Some of these methods assume a context for their dispatch, some of which may be established by using AsyncContext#start. Do these methods assume that #start has been called? should they check and effectively do a #start themselves? or are these methods just prohibited from use by non-container threads... in which case where do we specify this?
Contributor guide
Assessment
This issue has not been assessed yet.