Rack::Response
The response object. See Rack::Response and Rack::ResponseHelpers for more info: rack.rubyforge.org/doc/classes/Rack/Response.html rack.rubyforge.org/doc/classes/Rack/Response/Helpers.html
# File lib/sinatra/base.rb, line 72 def finish(&block) if [204, 304].include?(status.to_i) header.delete "Content-Type" header.delete "Content-Length" [status.to_i, header.to_hash, []] else body = block || @body || [] body = [body] if String === body if Array === body header["Content-Length"] = body. inject(0) { |len, part| len + Rack::Utils.bytesize(part) }.to_s end [status.to_i, header.to_hash, body] end end
Generated with the Darkfish Rdoc Generator 2.