Multipart request processing in a Filter should be possible but is not defined
- Dominant language
- Java
- Stars
- 325
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
The section on file uploads specifies that the servlet container provides multipart/form-data processing if the Servlet is annotated with @MultipartConfig or the deployment descriptor contains a multipart-config element. Then the Servlet can use the HttpServletRequest getParts and getPart methods.
A Filter should also be able to call getParts but there is no way for a filter to be configured like a Servlet with multiple config markers.
An important use case to point out is providing CSRF protection (typically done with a Servlet) for multipart requests where the filter needs to access information about what parts are submitted in order to validate the request.
Contributor guide
Assessment
This issue has not been assessed yet.