Add condition to reset content-type only if it isd not already set

Polish some of the POMs to address missing dependencies
Temporary disconnect gcp background sample until errors are fixed
This commit is contained in:
Oleg Zhurakousky
2020-07-13 14:21:02 +02:00
parent 8ef8190681
commit 0537ce061b
6 changed files with 32 additions and 21 deletions

View File

@@ -687,7 +687,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
// Set the contentType header to the value of accept for "legacy" reasons. But, do not set the
// contentType header to the value of accept if it is a wildcard type, as this doesn't make sense.
// This also applies to the else branch below.
if (acceptedContentType.isConcrete()) {
if (acceptedContentType.isConcrete() && !headersMap.containsKey(MessageHeaders.CONTENT_TYPE)) {
headersMap.put(MessageHeaders.CONTENT_TYPE, acceptedContentType);
}
}