class Sinatra::Request

rack.rubyforge.org/doc/classes/Rack/Request.html<br>The request object. See Rack::Request for more info:

def accept

Returns an array of acceptable media types for the response
def accept
  @env['HTTP_ACCEPT'].to_s.split(',').map { |a| a.split(';')[0].strip }
end

def path_info=(value)

def path_info=(value)
  @route = nil
  super
end

def route

def route
  @route ||= begin
    path = Rack::Utils.unescape(path_info)
    path.empty? ? "/" : path
  end
end

def secure?

using SSL to communicate with the client.
Whether or not the web server (or a reverse proxy in front of it) is
def secure?
  @env['HTTPS'] == 'on' or
  @env['HTTP_X_FORWARDED_PROTO'] == 'https' or
  @env['rack.url_scheme'] == 'https'
end