-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
Oliver Drotbohm opened SPR-6594 and commented
HiddenHttpMethodFilter
currently does not work when handling multipart request, as it relies on request.getParameter(..)
which does not return the actual parameter's value in multipart requests.
As I can understand that one might want to keep the filter independent of Spring MVC, I'd suggest to introduce a subclass that might lookup a configured multipartResolver from the application context and use it to obtain the parameters. As we deal with a filter this would require the resolver being declared inside the ApplicationContext
loaded by the ContextLoaderListener
. This feels a little ugly as one probably should tend to avoid web things inside this ApplicationContext
.
As the only existing implementation is CommonsMultipartResolver
and this implementation uses a static method of ServletFileUpload
a reasonable way might also be just to check the availablity of Commons Fileupload in the classpath and using this method to determine the multipart nature of the request then.
Affects: 3.0 GA
Issue Links:
- ROO-442 Provide multipart file upload support ("is depended on by")
- ServletRequestDataBinder does not bind MultipartFile with HiddenHttpMethodFilter and Multipart Request [SPR-7795] #12451 ServletRequestDataBinder does not bind MultipartFile with HiddenHttpMethodFilter and Multipart Request
Referenced from: commits 2c9753a, 0eabef0
4 votes, 11 watchers