Skip to content

Commit

Permalink
Update simple_app example
Browse files Browse the repository at this point in the history
  • Loading branch information
mynyml committed Jan 29, 2010
1 parent 5834fde commit fd43bd9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/simple_app.ru
@@ -1,11 +1,9 @@
# run me with:
# $rackup examples/simple_app.ru -p 8080
# $rackup examples/simple_app.ru
#
require 'pathname'
root = Pathname(__FILE__).dirname.parent.expand_path
$:.unshift(root + 'lib')
$:.unshift Pathname(__FILE__).dirname.parent + 'lib'

require 'rubygems'
require 'rack'
require 'rack/respond_to'

Expand All @@ -23,7 +21,7 @@ class App
end
end

[200, {'Content-Type' => Rack::RespondTo.selected_media_type}, [body]]
[200, {'Content-Type' => Rack::RespondTo.selected_media_type || ''}, [body || '']]
end
end

Expand Down

0 comments on commit fd43bd9

Please sign in to comment.