From b56fb738019418e6329455cb298ce465fbd64333 Mon Sep 17 00:00:00 2001 From: Cyrus <24922493+cyrus-dev@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:40:50 -0500 Subject: [PATCH] Updated the file to just use the fileName from the ReferenceManifest for the downloaded name. --- .../ReferenceManifestPageController.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java index 9f7c5c7c..243d1d8b 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java @@ -339,19 +339,7 @@ public class ReferenceManifestPageController response.sendError(HttpServletResponse.SC_NOT_FOUND); } else { StringBuilder fileName = new StringBuilder("filename=\""); - if (referenceManifest.getRimType().equals(ReferenceManifest.BASE_RIM)) { - BaseReferenceManifest bRim = (BaseReferenceManifest) referenceManifest; - fileName.append(bRim.getSwidName()); - fileName.append("_["); - fileName.append(referenceManifest.getRimHash()); - fileName.append("]"); - fileName.append(".swidTag\""); - } else { - // this needs to be updated for support rims - SupportReferenceManifest bRim = (SupportReferenceManifest) referenceManifest; - fileName.append(bRim.getFileName()); - } - + fileName.append(referenceManifest.getFileName()); // Set filename for download. response.setHeader("Content-Disposition", "attachment;" + fileName); response.setContentType("application/octet-stream");