Browse files

[misc] Added some comments

  • Loading branch information...
1 parent c00e4c1 commit 46d39fc36dfc07c1f72b74bf6ff0fcc4f50659c7 @sdumitriu sdumitriu committed Dec 26, 2011
View
2 ...-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/DownloadAction.java
@@ -285,6 +285,8 @@ private static void setCommonHeaders(final XWikiAttachment attachment,
if ("1".equals(request.getParameter("force-download"))) {
dispType = "attachment";
}
+ // Use RFC 2231 for encoding filenames, since the normal HTTP headers only allows ASCII characters.
+ // See http://tools.ietf.org/html/rfc2231 for more details.
response.addHeader("Content-disposition", dispType + "; filename*=utf-8''" + ofilename);
response.setDateHeader("Last-Modified", attachment.getDate().getTime());

0 comments on commit 46d39fc

Please sign in to comment.