diff options
author | evanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-10-29 05:37:35 +0000 |
---|---|---|
committer | evanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-10-29 05:37:35 +0000 |
commit | b198e9fe949b7ef53bf9573ae58c181b9e5bf897 (patch) | |
tree | a1183cfb672859697b65ebb9dde3f7800a8afeda | |
parent | eee31c293bc107334ac2ac7704dc44d1f1c43863 (diff) | |
download | unicorn-b198e9fe949b7ef53bf9573ae58c181b9e5bf897.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@826 19e92222-5c0b-0410-8929-a290d50e31e9
-rw-r--r-- | lib/mongrel/handlers.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb index 499d69f..ee76179 100644 --- a/lib/mongrel/handlers.rb +++ b/lib/mongrel/handlers.rb @@ -69,9 +69,11 @@ module Mongrel end + # # The server normally returns a 404 response if an unknown URI is requested, but it # also returns a lame empty message. This lets you do a 404 response # with a custom message for special URIs. + # class Error404Handler < HttpHandler # Sets the message to return. This is constructed once for the handler @@ -87,24 +89,25 @@ module Mongrel end - + # # Serves the contents of a directory. You give it the path to the root # where the files are located, and it tries to find the files based on # the PATH_INFO inside the directory. If the requested path is a # directory then it returns a simple directory listing. # # It does a simple protection against going outside it's root path by - # converting all paths to an absolute expanded path, and then making sure - # that the final expanded path includes the root path. If it doesn't + # converting all paths to an absolute expanded path, and then making + # sure that the final expanded path includes the root path. If it doesn't # than it simply gives a 404. # # If you pass nil as the root path, it will not check any locations or - # expand any paths. This lets you serve files from multiple directories + # expand any paths. This lets you serve files from multiple drives # on win32. # # The default content type is "text/plain; charset=ISO-8859-1" but you # can change it anything you want using the DirHandler.default_content_type # attribute. + # class DirHandler < HttpHandler attr_accessor :default_content_type attr_reader :path |