-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Possibility to configure encoding other than ascii in FormHttpMessageConverter.MultipartHttpOutputMessage [SPR-15396] #19959
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
Comments
Juergen Hoeller commented I'm currently revising a few spots in terms of configurable character encodings already, so I'll have a look at this one for 4.3.8 still. At a minimum, we should be able to provide an overridable protected template method or a configurable property for the multipart encoding here. |
Anders Båtstrand commented
For my team, replacing On the other hand, having it possible to configure using a property would make the fix usable for users of older versions of Spring Cloud Netflix. |
Juergen Hoeller commented On review, it looks like we addressed a similar requirement through #16724 back in 4.1.1 already. Rossen Stoyanchev, do you see a need for yet another configurable charset variant here, or is the existing |
Anders Båtstrand commented Just some input: Using |
Juergen Hoeller commented Indeed, there's a I'm wondering whether the |
Anders Båtstrand commented I use Zuul, but I have not looked into exactly how the header is set. A solution for my team would be to use |
Anders Båtstrand commented Any news on this? Should I attempt a pull request? |
Rossen Stoyanchev commented This should be addressed in 5.0 with #19769. The ticket is quite long so the resulting commit might be more helpful to see. Effectively we now use the |
Rossen Stoyanchev commented Marking as duplicate of #19769 and resolving but feel free to comment. |
Anders Båtstrand opened SPR-15396 and commented
For some cases, it is useful to allow non-ascii characters in the mime headers in multipart requests. For example when using Zuul to proxy file uploads with non-ascii filenames.
The encoding used is hard-coded in
FormHttpMessageConverter.MultipartHttpOutputMessage#getAsciiBytes(String)
.Although that seems correct, I guess most browsers does not respect this. It would be really useful if that encoding was possible to disable/configure in some way.
I would be happy to provide a pull request if this is something you would consider.
The only work-around for me now, is to duplicate
FormHttpMessageConverter
in my code, with a slightly modified inner class MultipartHttpOutputMessage.Issue Links:
The text was updated successfully, but these errors were encountered: