INT-3697: Map contentType to HTTP Response
JIRA: https://jira.spring.io/browse/INT-3697 Since Spring Integration 4.0 the `MessageHeaders` had been moved to the Spring Messaging module and `MessageHeaders.CONTENT_TYPE` had been changed from `content-type` name to the `contentType`. Previously the automatic mapping of `contentType` to the HTTP Request `Content-Type` has been introduced for the `HttpRequestExecutingMessageHandler`. This fix do the same for the HTTP Response in case of HTTP Inbound Endpoint. This allows to transfer HTTP headers automatically from underlying HTTP Outbound Endpoint for HTTP Proxy scenario. The response from that external HTTP service maybe changed during a downstream flow before sending HTTP Response from the HTTP Inbound Endpoint. Before this we was forced to map `contentType` to `Content-Type` manually or just rely on the `HttpMessageConverter`s. **Cherry-pick to 4.1.x**
This commit is contained in:
@@ -490,7 +490,7 @@ public class DefaultHttpHeaderMapper implements HeaderMapper<HttpHeaders>, BeanF
|
||||
}
|
||||
|
||||
private boolean shouldMapOutboundHeader(String headerName) {
|
||||
String[] outboundHeaderNamesLower = this.outboundHeaderNamesLower;
|
||||
String[] outboundHeaderNamesLower = this.outboundHeaderNamesLowerWithContentType;
|
||||
|
||||
if (this.isDefaultInboundMapper) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user