Skip to content

Configure CommonsMultipartResolver to support specific HTTP methods #27161

Closed
@jhoeller

Description

@jhoeller

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).

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions