Method: Rack::Lint#_call

Defined in:
lib/rack/lint.rb

#_call(env) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/rack/lint.rb', line 38

def _call(env)
  ## It takes exactly one argument, the *environment*
  assert("No env given") { env }
  check_env env

  env['rack.input'] = InputWrapper.new(env['rack.input'])
  env['rack.errors'] = ErrorWrapper.new(env['rack.errors'])

  ## and returns an Array of exactly three values:
  status, headers, @body = @app.call(env)
  ## The *status*,
  check_status status
  ## the *headers*,
  check_headers headers
  ## and the *body*.
  check_content_type status, headers
  check_content_length status, headers, env
  [status, headers, self]
end