[Hiki-cvs 1512] [1059] use Hiki::Response

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 9月 10日 (木) 23:02:15 JST


Revision: 1059
          http://sourceforge.jp/projects/hiki/svn/view?view=rev&revision=1059
Author:   okkez
Date:     2009-09-10 23:02:15 +0900 (Thu, 10 Sep 2009)

Log Message:
-----------
use Hiki::Response

Modified Paths:
--------------
    hiki/branches/rack/misc/plugin/attach.rb

Modified: hiki/branches/rack/misc/plugin/attach.rb
===================================================================
--- hiki/branches/rack/misc/plugin/attach.rb	2009-09-08 15:45:37 UTC (rev 1058)
+++ hiki/branches/rack/misc/plugin/attach.rb	2009-09-10 14:02:15 UTC (rev 1059)
@@ -110,13 +110,11 @@
     else
       header['Content-Disposition'] = %Q|attachment; filename="#{file_name.to_sjis}"; modification-date="#{header['Last-Modified']}";|
     end
-    print****@cgi*****(header)
-    print File.open(attach_file.untaint, 'rb').read
+    return ::Hiki::Response.new(File.open(attach_file.untaint, 'rb').read, 200, header)
   else
     data = get_common_data( @db, @plugin, @conf )
-    generate_error_page( data )
+    return generate_error_page( data )
   end
-  nil
 end
 
 def attach_src(file_name, page = @page)




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