Commit 6d60c234 authored by Brian Clozel's avatar Brian Clozel Committed by Stephane Nicoll

Disable Accept-Charset Header in String converter

This commit prevents the `Accept-Charset` from being written by the
StringHttpMessageConverter. This feature is enabled by default in the
framework and writes a *quite long* response header with all charsets
supported by the server.

Closes gh-2370, see gh-1800
parent ff2d423f
...@@ -144,7 +144,9 @@ public class HttpMessageConvertersAutoConfiguration { ...@@ -144,7 +144,9 @@ public class HttpMessageConvertersAutoConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
public StringHttpMessageConverter stringHttpMessageConverter() { public StringHttpMessageConverter stringHttpMessageConverter() {
return new StringHttpMessageConverter(this.encodingProperties.getCharset()); StringHttpMessageConverter converter = new StringHttpMessageConverter(this.encodingProperties.getCharset());
converter.setWriteAcceptCharset(false);
return converter;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment