Preserve media type parameters when setting charset
Issue: SPR-17040
This commit is contained in:
committed by
Rossen Stoyanchev
parent
905e3c1f9f
commit
46fe74d2f9
@@ -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