lib/thomler.rb in thomler-0.1.3 vs lib/thomler.rb in thomler-0.1.4
- old
+ new
@@ -3,9 +3,12 @@
require "thomler/routing"
module Thomler
class Application
def call env
+ if env['PATH_INFO'] == '/favicon.ico'
+ return [404, {'Content-Type' => 'text/html'}, []]
+ end
klass, act = get_controller_and_action(env)
controller = klass.new(env)
text = controller.send(act)
[200, {'Content-Type' => 'text/html'}, [text]]
end