mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Preserve media type parameters when setting charset
Issue: SPR-17040
This commit is contained in:
committed by
Rossen Stoyanchev
parent
905e3c1f9f
commit
46fe74d2f9
+1
-1
@@ -90,7 +90,7 @@ public abstract class AbstractWireFeedHttpMessageConverter<T extends WireFeed>
|
||||
Charset.forName(wireFeed.getEncoding()) : DEFAULT_CHARSET);
|
||||
MediaType contentType = outputMessage.getHeaders().getContentType();
|
||||
if (contentType != null) {
|
||||
contentType = new MediaType(contentType.getType(), contentType.getSubtype(), charset);
|
||||
contentType = new MediaType(contentType, charset);
|
||||
outputMessage.getHeaders().setContentType(contentType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user