New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int-http:inbound-gateway do not sets content-type header [INT-3697] #7657
Comments
Alexei Osipov commented Test case:
|
Artem Bilan commented Alexei,
If you mean the if (CollectionUtils.isEmpty(acceptTypes)) {
acceptTypes = Collections.singletonList(MediaType.ALL);
}
for (HttpMessageConverter converter : this.getMessageConverters()) {
for (MediaType acceptType : acceptTypes) {
if (converter.canWrite(content.getClass(), acceptType)) {
converter.write(content, acceptType, response);
return;
}
}
} Where the appropriate Please, share your specific case, where you really need the Thank you! |
Alexei Osipov commented Yes, I mean processing of response for an inbound HTTP request. Case: Flow:
I agree that it's not really common case but the actual behavior is quite confusing for me. |
Gary Russell commented Merged to master. Alexei_Osipov Unfortunately, we can't apply this change to the 4.1.x branch because it represents a behavior change. Although it's a bug, we can't afford the potential breakage of applications that expect the existing behavior. With 4.2, we will be able to cover the behavior change in the 4.1 to 4.2 migration guide. For 4.1, the work-around is to add a |
Alexei Osipov commented Artem, Gary, thank you! |
Alexei Osipov opened INT-3697 and commented
Almost same issue as in #7474.
Default behavior of int-http:inbound-gateway does not recognizes integration header "contentType" and tries to look up "Content-type".
So
DefaultHttpHeaderMapper.inboundMapper().fromHeaders(...)
just skipsMessageHeaders.CONTENT_TYPE
header.Affects: 4.1.2, 4.1.3
Referenced from: pull request #1419
The text was updated successfully, but these errors were encountered: