ContentRequestMatchers.MultipartHelper default charset #31923
Labels
in: test
Issues in the test module
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: superseded
An issue that has been superseded by another
Uh oh!
There was an error while loading. Please reload this page.
Affects: 6.1.2
While using the @RestClientTest I had an issue where I sent a Multipart request and wanted to confirm in a test that it was correctly formed.
But during testing I noticed that the request was handled by MultipartHelper and it didn't parse correctly my
application/json
part inUTF-8
, resulting in some symbols being malformed. Although, it worked correctly while using the deprecatedapplication/json; charset=utf-8
.spring-framework/spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java
Line 361 in f5b4f7d
After further investigation I noticed that
DiskFileItemFactory
is used with default values, with the charset set tothis.defaultCharset = "ISO-8859-1"
.Would it make sense for
MultipartHelper
to default to UTF-8?The text was updated successfully, but these errors were encountered: