aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj M <mkr1481@gmail.com>2019-04-26 15:46:32 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-04-26 15:46:32 +0530
commit69fd82243f00695f14c86d339d9bc62e1d81ed82 (patch)
treec211a3f62303d0442fc48008219c74b08f18aa24
parent26fc3d01a9be64e10cbeb814559fd98fefbd7ba7 (diff)
Do not Override the HTTP headers from OCS YAML
Issue-ID: CLI-129 Change-Id: I2ead79fdc12379409ba8060429ebbf80c8b4cf03 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java3
1 files changed, 2 insertions, 1 deletions
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<String, String> header : this.mapCommonHeaders.entrySet()) {
- input.getReqHeaders().put(header.getKey(), header.getValue());
+ if (!input.getReqHeaders().containsKey(header.getKey()))
+ input.getReqHeaders().put(header.getKey(), header.getValue());
}
}