aboutsummaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator
diff options
context:
space:
mode:
authorTal Gitelman <tal.gitelman@att.com>2018-11-07 15:41:55 +0200
committerTal Gitelman <tal.gitelman@att.com>2018-11-07 17:49:19 +0200
commit3edb71cfc640b32a7cea3ee0823350ef19dd7694 (patch)
treec94bf2046a03f251f1d08bca7b7dca0f2ee8755d /utils/webseal-simulator
parenta706d714e2d0f308abe6fea01f091a1c5a1fe5ee (diff)
Error displayed on deleting VF/VFC
- from Service Composition Change-Id: I48c2256b0584c69b94c870eefd834eaf2891f56d Issue-ID: SDC-1888 Signed-off-by: Tal Gitelman <tal.gitelman@att.com>
Diffstat (limited to 'utils/webseal-simulator')
-rw-r--r--utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/SdcProxy.java13
1 files changed, 7 insertions, 6 deletions
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());
-
}
}