diff --git a/script/server b/script/server index 27a7989a..1901871f 100755 --- a/script/server +++ b/script/server @@ -8,7 +8,20 @@ OPTIONS = { :ip => "0.0.0.0", :environment => "production", :server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"), - :server_type => WEBrick::SimpleServer + :server_type => WEBrick::SimpleServer, + :mime_types => WEBrick::HTTPUtils::DefaultMimeTypes.merge({ + 'avi' => 'video/x-msvideo', + 'gz' => 'application/x-gzip', + 'js' => 'application/x-javascript', + 'nb' => 'application/mathematica', + 'pdf' => 'application/pdf', + 'svg' => 'application/svg+xml', + 'tar' => 'application/x-tar', + 'tex' => 'application/x-tex', + 'xhtml' => 'application/xhtml+xml', + 'xml' => 'application/xml', + 'xslt' => 'application/xslt+xml' + }) } ARGV.options do |opts| diff --git a/test/functional/file_controller_test.rb b/test/functional/file_controller_test.rb index dbc30ccd..0cfd89c3 100755 --- a/test/functional/file_controller_test.rb +++ b/test/functional/file_controller_test.rb @@ -87,8 +87,6 @@ class FileControllerTest < Test::Unit::TestCase # User uploads the picture picture = File.read("#{RAILS_ROOT}/test/fixtures/rails.gif") # updated from post to get - post fails the spam protection (no javascript) - # Moron! If substituting GET for POST actually works, you - # have much, much bigger problems. r = get :file, :web => 'wiki1', :file => {:file_name => 'rails-e2e.gif', :content => StringIO.new(picture),