summaryrefslogtreecommitdiffstats
path: root/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-03-24 14:00:54 +0100
committerDenes Nemeth <denes.nemeth@nokia.com>2018-03-25 21:32:03 +0200
commitc82c886215ed34953a51dff0710c6bd15cb80ee4 (patch)
tree783f928ba8e033bbf55b6cffa343c7ea47c40b59 /nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
parent1489e4215e075ab3ffe8f7158559a38778cd0b34 (diff)
Removing jackson to mitigate cve-2017-4995
Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com> Issue-ID: VFC-728 Change-Id: Ib495d4706361cc39527dfe86463aa505d9564afa
Diffstat (limited to 'nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java')
-rw-r--r--nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
index 790ac054..7ae05f5e 100644
--- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
+++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/restapi/ConverterApi.java
@@ -16,25 +16,24 @@
package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.restapi;
import com.google.common.io.ByteStreams;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.Part;
import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.packagetransformer.OnapVnfPackageBuilder;
import org.slf4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.Part;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import static org.apache.http.entity.ContentType.APPLICATION_OCTET_STREAM;
import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.CbamUtils.buildFatalFailure;
import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util.SystemFunctions.systemFunctions;
import static org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.DriverProperties.BASE_URL;
import static org.slf4j.LoggerFactory.getLogger;
import static org.springframework.http.HttpHeaders.*;
import static org.springframework.http.HttpStatus.OK;
+import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM;
import static org.springframework.http.MediaType.TEXT_HTML_VALUE;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
@@ -71,7 +70,7 @@ public class ConverterApi {
} catch (Exception e) {
throw buildFatalFailure(logger, "Unable to convert VNF package", e);
}
- httpResponse.addHeader(CONTENT_TYPE, APPLICATION_OCTET_STREAM.getMimeType());
+ httpResponse.addHeader(CONTENT_TYPE, APPLICATION_OCTET_STREAM.toString());
httpResponse.setStatus(OK.value());
httpResponse.addHeader(CONTENT_LENGTH, Integer.toString(convertedPackage.length));
httpResponse.addHeader(CONTENT_DISPOSITION, "attachment; filename=\"" + "core.csar" + "\"");