Headers are currently decoded using the system default charset if no explicit charset is passed to the MultipartContext. This caused my application to work correctly on my laptop and the integration test server, but broke in production because the docker container defaulted to latin-1 instead of utf-8 :(
Using the system default charset for anything but console output is considered bad practice as it breaks portability. There is even a JEP draft to deprecate the default charset. See http://openjdk.java.net/jeps/8187041
MultipartContext should not allow null as a charEncoding parameter, or default to UTF-8 (all modern browsers and most HTTP client libraries use UTF-8 per default, even if the RFCs are unclear about this).
Headers are currently decoded using the system default charset if no explicit charset is passed to the MultipartContext. This caused my application to work correctly on my laptop and the integration test server, but broke in production because the docker container defaulted to
latin-1
instead ofutf-8
:(Using the system default charset for anything but console output is considered bad practice as it breaks portability. There is even a JEP draft to deprecate the default charset. See http://openjdk.java.net/jeps/8187041
MultipartContext should not allow
null
as acharEncoding
parameter, or default toUTF-8
(all modern browsers and most HTTP client libraries use UTF-8 per default, even if the RFCs are unclear about this).