module Roda::RodaPlugins::Base::ResponseMethods

def finish

# []]
# {'Content-Type'=>'text/html', 'Content-Length'=>'0'},
# => [200,
response.finish

Example:

Adds the Content-Length header to the size of the response body.
been written to, otherwise uses a 404 status.
uses the return value of default_status if the body has
for the current response. If the status has not been set,
Return the rack response array of status, headers, and body
def finish
  b = @body
  s = (@status ||= b.empty? ? 404 : default_status)
  set_default_headers
  h = @headers
  h[CONTENT_LENGTH] ||= @length.to_s
  [s, h, b]
end