right now im migratingour spring application from 4 to 5. I'm facing issue with particular on spring web module
spring-web-4.3.21.RELEASE.jar to spring-web-5.1.13.RELEASE.jar
I noticed the changes in HttpHeaders class. In spring-web-4.3.21.RELEASE.jar
where HTTP Header was
public HttpHeaders() {
this(new LinkedCaseInsensitiveMap<List<String>>(8, Locale.ENGLISH), false);
}
Now on Spring 5- this is changed to
public HttpHeaders() {
this(CollectionUtils.toMultiValueMap(new LinkedCaseInsensitiveMap<>(8, Locale.ENGLISH)));
}
Now header is changed from- {Accept=[application/json], Content-Type=[multipart/form-data;boundary=8HFYfdj_y58sNxrSdXenwlIQDsYiXS50], Content-Length=[51024]}
to [Accept:"application/json", Content-Type:"multipart/form-data;charset=UTF-8;boundary=lqBw1IeG3PhU9oYKiHGbhABo2SWZ6lBR", Content-Length:"37353"]
I searched a lot found one similar issue this seems some more closely relevant - Upgrading to Spring 5 broke RestTemplate MultipartFile upload
Do anyone have any Idea how to deal this.