summaryrefslogtreecommitdiffstats
path: root/rest-services
diff options
context:
space:
mode:
authorpwielebs <piotr.wielebski@nokia.com>2019-11-13 12:38:28 +0100
committerpwielebs <piotr.wielebski@nokia.com>2019-11-13 12:38:28 +0100
commite5e5fd19bd18d08e9d9985a74387137c13935e44 (patch)
tree05685b6f7f96aa0f4299caabfbb74ec9f87ed002 /rest-services
parent3236d78ea38211812fdd862453416286ae5df3b7 (diff)
Fix DCAE-SDK static code vulnerabilities
- Update patch version of SDK Change-Id: I2896e1bda3e09d27c0e3a9674861dc950ed43741 Issue-ID: DCAEGEN2-1917 Signed-off-by: pwielebs <piotr.wielebski@nokia.com>
Diffstat (limited to 'rest-services')
-rw-r--r--rest-services/aai-client/pom.xml2
-rw-r--r--rest-services/cbs-client/pom.xml2
-rw-r--r--rest-services/dmaap-client/pom.xml2
-rw-r--r--rest-services/http-client/pom.xml2
-rw-r--r--rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/HttpHeaders.java2
-rw-r--r--rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/RxHttpClient.java5
-rw-r--r--rest-services/model/pom.xml2
-rw-r--r--rest-services/pom.xml2
8 files changed, 11 insertions, 8 deletions
diff --git a/rest-services/aai-client/pom.xml b/rest-services/aai-client/pom.xml
index 6cea5af1..798d61db 100644
--- a/rest-services/aai-client/pom.xml
+++ b/rest-services/aai-client/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.3.2-SNAPSHOT</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/cbs-client/pom.xml b/rest-services/cbs-client/pom.xml
index 8c081417..a9aace8a 100644
--- a/rest-services/cbs-client/pom.xml
+++ b/rest-services/cbs-client/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.3.2-SNAPSHOT</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/dmaap-client/pom.xml b/rest-services/dmaap-client/pom.xml
index a4c46d41..f7cb3bcc 100644
--- a/rest-services/dmaap-client/pom.xml
+++ b/rest-services/dmaap-client/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.3.2-SNAPSHOT</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/http-client/pom.xml b/rest-services/http-client/pom.xml
index d3b8f124..be343ad8 100644
--- a/rest-services/http-client/pom.xml
+++ b/rest-services/http-client/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.3.2-SNAPSHOT</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/HttpHeaders.java b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/HttpHeaders.java
index 4ef43a59..c9ea7e6f 100644
--- a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/HttpHeaders.java
+++ b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/HttpHeaders.java
@@ -31,4 +31,6 @@ public final class HttpHeaders {
public static final String CONTENT_TYPE = "Content-Type";
public static final String CONTENT_LENGTH = "Content-Length";
+ public static final String CHUNKED = "chunked";
+ public static final String TRANSFER_ENCODING_TYPE = "Transfer-Encoding";
}
diff --git a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/RxHttpClient.java b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/RxHttpClient.java
index 234a3800..7ac02bf6 100644
--- a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/RxHttpClient.java
+++ b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/RxHttpClient.java
@@ -20,7 +20,6 @@
package org.onap.dcaegen2.services.sdk.rest.services.adapters.http;
import io.vavr.collection.Stream;
-import java.util.stream.Collectors;
import org.onap.dcaegen2.services.sdk.rest.services.model.logging.RequestDiagnosticContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -30,6 +29,8 @@ import reactor.netty.http.client.HttpClient.ResponseReceiver;
import reactor.netty.http.client.HttpClientRequest;
import reactor.netty.http.client.HttpClientResponse;
+import java.util.stream.Collectors;
+
/**
* @since 1.1.4
*/
@@ -71,7 +72,7 @@ public class RxHttpClient {
private ResponseReceiver<?> prepareBodyChunked(HttpRequest request, HttpClient theClient) {
return theClient
- .chunkedTransfer(true)
+ .headers(hdrs -> hdrs.set(HttpHeaders.TRANSFER_ENCODING_TYPE, HttpHeaders.CHUNKED))
.request(request.method().asNetty())
.send(request.body().contents())
.uri(request.url());
diff --git a/rest-services/model/pom.xml b/rest-services/model/pom.xml
index 74d0556f..69e50876 100644
--- a/rest-services/model/pom.xml
+++ b/rest-services/model/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.3.2-SNAPSHOT</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
diff --git a/rest-services/pom.xml b/rest-services/pom.xml
index 0b434e3a..6f7150fb 100644
--- a/rest-services/pom.xml
+++ b/rest-services/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.onap.dcaegen2.services</groupId>
<artifactId>sdk</artifactId>
- <version>1.3.2-SNAPSHOT</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>