class Sinatra::Base

def detect_rack_handler

def detect_rack_handler
  servers = Array(server)
  servers.each do |server_name|
    begin
      return Rack::Handler.get(server_name.downcase)
    rescue LoadError
    rescue NameError
    end
  end
  fail "Server handler (#{servers.join(',')}) not found."
end