lib/rack/file.rb in rack-1.1.6 vs lib/rack/file.rb in rack-1.2.0
- old
+ new
@@ -1,11 +1,13 @@
require 'time'
require 'rack/utils'
require 'rack/mime'
module Rack
- # Rack::File serves files below the +root+ given, according to the
+ # 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 http://localhost:9292/passwd
#
# Handlers can detect if bodies are a Rack::File, and use mechanisms
# like sendfile on the +path+.
class File