INT-3120: Remove Accept-Charset from Response
`StringHttpMessageConverter` adds `Accept-Charset` header by default. By RFC 2616 `Accept-Charset` is a Request header, so it won't be presented in the response. Turn off `writeAcceptCharset` in the `HttpRequestHandlingEndpointSupport`. JIRA: https://jira.springsource.org/browse/INT-3120
This commit is contained in:
committed by
Gary Russell
parent
937ac9647a
commit
5cb64f81f6
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.integration.http.inbound;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -53,6 +54,7 @@ import org.springframework.util.SerializationUtils;
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
* @author Gunnar Hillert
|
||||
* @author Artem Bilan
|
||||
* @since 2.0
|
||||
*/
|
||||
public class HttpRequestHandlingMessagingGatewayTests {
|
||||
@@ -151,6 +153,8 @@ public class HttpRequestHandlingMessagingGatewayTests {
|
||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||
gateway.handleRequest(request, response);
|
||||
assertEquals("HELLO", response.getContentAsString());
|
||||
//INT-3120
|
||||
assertNull(response.getHeader("Accept-Charset"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user