HttpHeaders.setContentDispositionFormData() doesn't encode non-acsii characters correctly [SPR-14547] #19115
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Wenhao Ji opened SPR-14547 and commented
When passing name or filename containing non-ascii characters to the
setContentDispositionFormData
method, a browser like Chrome and IE may behave strangely, opening a download dialog where those characters are replaced by hyphens.The parameters in http headers should be encoded according to [RFC5987] https://tools.ietf.org/html/rfc5987, so that we can get the correct string no matter what kind of characters are passed into.
For example,
The
Content-Disposition
header values that returns from the controller method above should be likefilename=UTF-8'zh-Hant-CN'%E4%B8%AD%E6%96%87.txt
.Affects: 4.3.2
Issue Links:
The text was updated successfully, but these errors were encountered: