aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java
diff options
context:
space:
mode:
authorMarek Szwałkiewicz <marek.szwalkiewicz@external.t-mobile.pl>2023-03-02 12:43:50 +0100
committerMarek Szwałkiewicz <marek.szwalkiewicz@external.t-mobile.pl>2023-03-03 12:42:35 +0100
commit508489a4ea7000b9e24cdb0ea48f5357010d783e (patch)
treed0ae300483b4fb943194ce8f0535a19eb9c1b8f5 /sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java
parent928348966d924f7cf41077f98ab6665ea6aec512 (diff)
Enable case insensitive matching of http headers
This change creates simple case insensitive map implementation that is used in HttpSdcResponse class to store the response headers. Generally HTTP headers are supposed to be case insensitive and sometimes get transformed (in our case - by istio sidecar) to lower case. With this change lower case will still be matched and the original behaviour will not break. Issue-ID: SDC-4233 Signed-off-by: Marek Szwałkiewicz <marek.szwalkiewicz@external.t-mobile.pl> Change-Id: I1cb9d9e75ff656ccb12c690c553bccc672332a12
Diffstat (limited to 'sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java')
-rw-r--r--sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java b/sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java
index c9eb4b3..a5404ae 100644
--- a/sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java
+++ b/sdc-distribution-client/src/test/java/org/onap/sdc/http/HttpRequestFactoryTest.java
@@ -25,12 +25,11 @@ import static org.mockito.Mockito.mock;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.junit.jupiter.api.Test;
+import org.onap.sdc.utils.CaseInsensitiveMap;
class HttpRequestFactoryTest {
@@ -40,7 +39,7 @@ class HttpRequestFactoryTest {
private static final String HEADER_KEY_2 = "key2";
private static final String HEADER_VALUE_1 = "value1";
private static final String HEADER_VALUE_2 = "value2";
- private static final Map<String, String> HEADERS = new HashMap<String, String>() {
+ private static final CaseInsensitiveMap<String, String> HEADERS = new CaseInsensitiveMap<String, String>() {
{
put(HEADER_KEY_1, HEADER_VALUE_1);
put(HEADER_KEY_2, HEADER_VALUE_2);