summaryrefslogtreecommitdiffstats
path: root/profiles/http
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/http')
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java7
1 files changed, 3 insertions, 4 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 e5494537..266ab855 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
@@ -232,11 +232,10 @@ public class OnapHttpConnection {
}
private void addCommonHeaders(HttpInput input) {
- if (!input.isBinaryData()) {
- if (!input.getReqHeaders().containsKey("Content-Type")) {
- input.getReqHeaders().put("Content-Type", OnapCommandHttpConstants.APPLICATION_JSON);
- }
+ if (!input.isBinaryData() && !input.getReqHeaders().containsKey("Content-Type")) {
+ input.getReqHeaders().put("Content-Type", OnapCommandHttpConstants.APPLICATION_JSON);
}
+
if (!input.getReqHeaders().containsKey("Accept")) {
input.getReqHeaders().put("Accept", OnapCommandHttpConstants.APPLICATION_JSON);
}