Method: ActionDispatch::FileHandler#attempt

Defined in:
actionpack/lib/action_dispatch/middleware/static.rb

#attempt(env) ⇒ Object



69
70
71
72
73
74
75
76
77
# File 'actionpack/lib/action_dispatch/middleware/static.rb', line 69

def attempt(env)
  request = Rack::Request.new env

  if request.get? || request.head?
    if found = find_file(request.path_info, accept_encoding: request.accept_encoding)
      serve request, *found
    end
  end
end