Class Rack::File
In: lib/rack/file.rb
Parent: Object

Rack::File serves files below the root directory given, according to the path info of the Rack request. e.g. when Rack::File.new("/etc") is used, you can access ‘passwd’ file as localhost:9292/passwd

Handlers can detect if bodies are a Rack::File, and use mechanisms like sendfile on the path.

Methods

_call   call   each   new   serving  

Constants

ALLOWED_VERBS = %w[GET HEAD OPTIONS]
ALLOW_HEADER = ALLOWED_VERBS.join(', ')
F = ::File

External Aliases

path -> to_path

Attributes

cache_control  [RW] 
path  [RW] 
root  [RW] 

Public Class methods

Public Instance methods

[Validate]