summaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'utils/webseal-simulator/src/main/java')
-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());
-
}
}