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 07421a6062
commit 2e5c670a28
6 changed files with 32 additions and 22 deletions

View File

@@ -686,7 +686,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);
}
}