From 69fd82243f00695f14c86d339d9bc62e1d81ed82 Mon Sep 17 00:00:00 2001 From: Kanagaraj M Date: Fri, 26 Apr 2019 15:46:32 +0530 Subject: Do not Override the HTTP headers from OCS YAML Issue-ID: CLI-129 Change-Id: I2ead79fdc12379409ba8060429ebbf80c8b4cf03 Signed-off-by: Kanagaraj Manickam k00365106 --- .../src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'profiles/http') diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java index 5b85ca9a..aa37e839 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java @@ -242,7 +242,8 @@ public class OnapHttpConnection { } for (Entry header : this.mapCommonHeaders.entrySet()) { - input.getReqHeaders().put(header.getKey(), header.getValue()); + if (!input.getReqHeaders().containsKey(header.getKey())) + input.getReqHeaders().put(header.getKey(), header.getValue()); } } -- cgit 1.2.3-korg