mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-18 10:46:39 +00:00
Merge pull request #326 from nsacyber/issue-324
[#324] Update filenames when downloading (RIM)
This commit is contained in:
commit
c181665ad9
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user