Skip to content

FormHttpMessageConverter doesn't support utf-8 filename [SPR-16061] #20610

Closed

Description

@spring-projects-issues

Xinyi.Liu opened SPR-16061 and commented

I want to use FeignClient to pass MultipartFile .https://github.com/pcan/feign-client-test this project doesn't work with chinese filename,maybe all non-ascII filename.
At first i find this jira #19115
then i upgrade spring-boot-starter to 1.5.7.RELEASE
but it still doesn't work!
Then i debuged again to find why,FormHttpMessageConverter line 408 getFilename seems to support filename*= , but FormHttpMessageConverter line 368 doesn't pass a charset to HttpHeaders line 682 , and at line 708 charset seems to be Deprecated.
I tried UrlEncoder to encode filename and set FormHttpMessageConverter.setMultipartCharset
in github project file FeignSpringFormEncoder,none of my tries works.


Affects: 4.3.11

Reference URL: https://github.com/pcan/feign-client-test

Issue Links:

Activity

  1. spring-projects-issues commented on Jul 10, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Brian Clozel commented

    Hi Xinyi.Liu,

    Sorry for the late feedback.

    Before you raised this issue, we've improved the behavior there in #18979 - filenames should support utf-8 by default now.

    Do you have a small code snippet I can take a look at that reproduces this issue? Looking at the Feign support project is a bit too much scope for this.

    Thanks!

  2. added
    type: bug
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: web

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions