Shin-ya Murakami
null****@okkez*****
2013年 12月 24日 (火) 22:01:35 JST
Shin-ya Murakami 2013-12-02 21:13:30 +0900 (Mon, 02 Dec 2013) New Revision: 21adbd464630ca4ccca841c3e58481e0f1a823bc https://github.com/hiki/hiki/commit/21adbd464630ca4ccca841c3e58481e0f1a823bc Merged 213daae: Merge pull request #46 from murashin/master Message: remove unwanted encoding conversion. Modified files: misc/plugin/attach.rb Modified: misc/plugin/attach.rb (+2 -2) =================================================================== --- misc/plugin/attach.rb 2013-12-02 21:01:44 +0900 (320e131) +++ misc/plugin/attach.rb 2013-12-02 21:13:30 +0900 (bfa1686) @@ -112,9 +112,9 @@ def attach_download header['Content-Length'] = File.size(attach_file.untaint) header['Last-Modified'] = CGI.rfc1123_date(File.mtime(attach_file.untaint)) if %r|^image/| =~ mime_type - header['Content-Disposition'] = %Q|inline; filename="#{file_name.to_sjis}"; modification-date="#{header['Last-Modified']}";| + header['Content-Disposition'] = %Q|inline; filename="#{file_name}"; modification-date="#{header['Last-Modified']}";| else - header['Content-Disposition'] = %Q|attachment; filename="#{file_name.to_sjis}"; modification-date="#{header['Last-Modified']}";| + header['Content-Disposition'] = %Q|attachment; filename="#{file_name}"; modification-date="#{header['Last-Modified']}";| end return ::Hiki::Response.new(File.open(attach_file.untaint, 'rb').read, 200, header) else