Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure CommonsMultipartResolver to support specific HTTP methods #27161

Closed
jhoeller opened this issue Jul 12, 2021 · 0 comments
Closed

Configure CommonsMultipartResolver to support specific HTTP methods #27161

jhoeller opened this issue Jul 12, 2021 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Jul 12, 2021

Commons FileUpload and therefore Spring's CommonsMultipartResolver traditionally supports POST requests only. There are several examples on StackOverflow and co where this got extended to e.g. POST and PUT. While StandardServletMultipartResolver does not restrict the HTTP method by default and suggests itself as a modern-day alternative, there are still scenarios where the maximum portability of Commons FileUpload (as a library that ships with the application) is desirable. As a consequence, a supportedMethods configuration option for enumerating POST, PUT, possibly PATCH or even custom methods is desirable.

This goes along with the new strictServletCompliance flag in StandardServletMultipartResolver (#26826).

@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Jul 12, 2021
@jhoeller jhoeller added this to the 5.3.9 milestone Jul 12, 2021
@jhoeller jhoeller self-assigned this Jul 12, 2021
Zoran0104 pushed a commit to Zoran0104/spring-framework that referenced this issue Aug 20, 2021
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
XIACYBING pushed a commit to XIACYBING/spring-framework that referenced this issue Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant