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

Part list/array gets resolved to all parts in current request [SPR-13893] #18467

Closed
spring-projects-issues opened this issue Jan 26, 2016 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 26, 2016

Juergen Hoeller opened SPR-13893 and commented

Our support for Servlet 3.0 Part lists and arrays is unfortunately highly inconsistent with the MultipartFile handling that it was supposed to align with. Our MultipartRequest interface allows for access to multiple files which got uploaded under the same name; this is also what a declared MultipartFile list/array argument would receive. However, the Servlet 3.0 HttpServletRequest.getParts method does not retrieve parts by name but rather always returns all parts of the given request, so we accidentally called that method without any use of our specified part name... Let's make this consistent for 4.3.


Affects: 4.2.4

Issue Links:

Referenced from: commits b4f33ad

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As of 4.3, Part list and array resolution takes the specified name into account, either from the annotation value or from the method parameter name.

If some application code accidentally relied on Part list/array resolution despite a name mismatch, it needs to be fixed to match the actual part name.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants