I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 024a5a1a authored by jrandom's avatar jrandom Committed by zzz
Browse files

deal with spaces in filenames cleanly

parent b031de54
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment