# File lib/rack/adapter/rails.rb, line 59 def call(env) path = env['PATH_INFO'].chomp('/') method = env['REQUEST_METHOD'] cached_path = (path.empty? ? 'index' : path) + ActionController::Base.page_cache_extension if FILE_METHODS.include?(method) if file_exist?(path) # Serve the file if it's there return serve_file(env) elsif file_exist?(cached_path) # Serve the page cache if it's there env['PATH_INFO'] = cached_path return serve_file(env) end end # No static file, let Rails handle it serve_rails(env) end