From 3edb71cfc640b32a7cea3ee0823350ef19dd7694 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Wed, 7 Nov 2018 15:41:55 +0200 Subject: Error displayed on deleting VF/VFC - from Service Composition Change-Id: I48c2256b0584c69b94c870eefd834eaf2891f56d Issue-ID: SDC-1888 Signed-off-by: Tal Gitelman --- .../java/org/openecomp/sdc/webseal/simulator/SdcProxy.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'utils/webseal-simulator/src/main/java/org') diff --git a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/SdcProxy.java b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/SdcProxy.java index 91e7c555f1..31d52292be 100644 --- a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/SdcProxy.java +++ b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/SdcProxy.java @@ -133,13 +133,14 @@ public class SdcProxy extends HttpServlet { response.setContentType("image/svg+xml"); } - InputStream responseBodyStream = closeableHttpResponse.getEntity().getContent(); - Header contentEncodingHeader = closeableHttpResponse.getLastHeader("Content-Encoding"); - if (contentEncodingHeader != null && contentEncodingHeader.getValue().equalsIgnoreCase("gzip")) { - responseBodyStream = new GZIPInputStream(responseBodyStream); + if(closeableHttpResponse.getEntity() != null) { + InputStream responseBodyStream = closeableHttpResponse.getEntity().getContent(); + Header contentEncodingHeader = closeableHttpResponse.getLastHeader("Content-Encoding"); + if (contentEncodingHeader != null && contentEncodingHeader.getValue().equalsIgnoreCase("gzip")) { + responseBodyStream = new GZIPInputStream(responseBodyStream); + } + write(responseBodyStream, response.getOutputStream()); } - write(responseBodyStream, response.getOutputStream()); - } } -- cgit 1.2.3-korg