diff options
author | pwielebs <piotr.wielebski@nokia.com> | 2019-11-13 12:38:28 +0100 |
---|---|---|
committer | pwielebs <piotr.wielebski@nokia.com> | 2019-11-13 12:38:28 +0100 |
commit | e5e5fd19bd18d08e9d9985a74387137c13935e44 (patch) | |
tree | 05685b6f7f96aa0f4299caabfbb74ec9f87ed002 /rest-services/http-client | |
parent | 3236d78ea38211812fdd862453416286ae5df3b7 (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/http-client')
3 files changed, 6 insertions, 3 deletions
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()); |