Closed
Description
Miroslav Holubec opened SPR-15205 and commented
There is wrong behavior when encoding/decoding Content-Disposition
header.
When I do setMultipartCharset() on AllEncompassingFormHttpMessageConverter, it emits header like this:
Content-Disposition: form-data; name="uploadedFile"; filename="=?UTF-8?Q?Declara=C3=A7=C3=A3o.pdf?="
StandardMultipartHttpServletRequest
cannot decode such a name, as it expects that "filename" is followed by asterisk.
I'm a bit lost in RFCs, as not sure if RFC 6266 should be applied here (means asterisk required) or not.
Affects: 4.3.6
Issue Links:
- Possibility to configure encoding other than ascii in FormHttpMessageConverter.MultipartHttpOutputMessage [SPR-15396] #19959 Possibility to configure encoding other than ascii in FormHttpMessageConverter.MultipartHttpOutputMessage ("is duplicated by")
- FormHttpMessageConverter writes ASCII encoded so that a multipart form data can not contain filenames with German Umlaute [SPR-12108] #16724 FormHttpMessageConverter writes ASCII encoded so that a multipart form data can not contain filenames with German Umlaute
- File upload with Servlet 3 multipart requests should support filename with charset encoding (RFC 2231) [SPR-13319] #17904 File upload with Servlet 3 multipart requests should support filename with charset encoding (RFC 2231)
- Introduce HttpHeaders getContentDisposition() and setContentDisposition() [SPR-14408] #18979 Introduce HttpHeaders getContentDisposition() and setContentDisposition()
- HttpHeaders.setContentDispositionFormData() doesn't encode non-acsii characters correctly [SPR-14547] #19115 HttpHeaders.setContentDispositionFormData() doesn't encode non-acsii characters correctly
- Unable to emulate upload filename browser behaviour with RestTemplate [SPR-15538] #20097 Unable to emulate upload filename browser behaviour with RestTemplate
Referenced from: commits 390bb87, bb684ce, 75117f4, f89511e, 3009e29