def detect_valid_handler(servers)
      handler = nil
      while (server_name = servers.shift) && handler.nil?
        begin
          handler = ::Rack::Handler.get(server_name)
          return [handler, server_name]
        rescue LoadError
          handler = nil
        rescue NameError
          handler = nil
        end
      end
    end
def detect_valid_handler(servers)
      handler = nil
      while (server_name = servers.shift) && handler.nil?
        begin
          handler = ::Rack::Handler.get(server_name)
          return [handler, server_name]
        rescue LoadError
          handler = nil
        rescue NameError
          handler = nil
        end
      end
    end
See what handlers work