class Sinatra::Base
def call!(env) # :nodoc:
def call!(env) # :nodoc: @env = env @params = IndifferentHash.new @request = Request.new(env) @response = Response.new @pinned_response = nil template_cache.clear if settings.reload_templates invoke { dispatch! } invoke { error_block!(response.status) } unless @env['sinatra.error'] unless @response['Content-Type'] if Array === body && body[0].respond_to?(:content_type) content_type body[0].content_type elsif default = settings.default_content_type content_type default end end @response.finish end