From 024a5a1ad4add4d52b4cfbcd80bc743ba85330b0 Mon Sep 17 00:00:00 2001 From: jrandom <jrandom> Date: Tue, 15 Nov 2005 06:29:51 +0000 Subject: [PATCH] deal with spaces in filenames cleanly --- apps/syndie/jsp/viewattachment.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/syndie/jsp/viewattachment.jsp b/apps/syndie/jsp/viewattachment.jsp index 0a0f0c7e4a..a8e76171b7 100644 --- a/apps/syndie/jsp/viewattachment.jsp +++ b/apps/syndie/jsp/viewattachment.jsp @@ -6,9 +6,9 @@ response.setContentType(ArchiveViewerBean.getAttachmentContentType(params)); boolean inline = ArchiveViewerBean.getAttachmentShouldShowInline(params); String filename = ArchiveViewerBean.getAttachmentFilename(params); if (inline) - response.setHeader("Content-Disposition", "inline; filename=" + filename); + response.setHeader("Content-Disposition", "inline; filename=\"" + filename + "\""); else - response.setHeader("Content-Disposition", "attachment; filename=" + filename); + response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\""); int len = ArchiveViewerBean.getAttachmentContentLength(params); if (len >= 0) response.setContentLength(len); -- GitLab