[Hiki-cvs 1589] hiki/hiki @ 2f3d33a [master] remove unwanted encoding conversion.

Back to archive index

Shin-ya Murakami null****@okkez*****
2013年 12月 2日 (月) 21:13:30 JST


Shin-ya Murakami	2013-12-02 21:13:30 +0900 (Mon, 02 Dec 2013)

  New Revision: 2f3d33a1c1dd34645457d4a6053b9c3cba3ee74a
  https://github.com/hiki/hiki/commit/2f3d33a1c1dd34645457d4a6053b9c3cba3ee74a

  Merged d2d5a4a: Merge pull request #50 from murashin/work2

  Message:
    remove unwanted encoding conversion.

  Modified files:
    misc/plugin/attach.rb

  Modified: misc/plugin/attach.rb (+2 -2)
===================================================================
--- misc/plugin/attach.rb    2013-11-21 11:03:06 +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




Hiki-cvs メーリングリストの案内
Back to archive index