Changeset 827
- Timestamp:
- 10/29/07 00:38:01 (10 months ago)
- Files:
-
- tags/rel_1-0-4/lib/mongrel/handlers.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tags/rel_1-0-4/lib/mongrel/handlers.rb
r819 r827 70 70 71 71 72 # 72 73 # The server normally returns a 404 response if an unknown URI is requested, but it 73 74 # also returns a lame empty message. This lets you do a 404 response 74 75 # with a custom message for special URIs. 76 # 75 77 class Error404Handler < HttpHandler 76 78 … … 88 90 end 89 91 90 92 # 91 93 # Serves the contents of a directory. You give it the path to the root 92 94 # where the files are located, and it tries to find the files based on … … 95 97 # 96 98 # It does a simple protection against going outside it's root path by 97 # converting all paths to an absolute expanded path, and then making sure98 # that the final expanded path includes the root path. If it doesn't99 # converting all paths to an absolute expanded path, and then making 100 # sure that the final expanded path includes the root path. If it doesn't 99 101 # than it simply gives a 404. 100 102 # 101 103 # If you pass nil as the root path, it will not check any locations or 102 # expand any paths. This lets you serve files from multiple d irectories104 # expand any paths. This lets you serve files from multiple drives 103 105 # on win32. 104 106 # … … 106 108 # can change it anything you want using the DirHandler.default_content_type 107 109 # attribute. 110 # 108 111 class DirHandler < HttpHandler 109 112 attr_accessor :default_content_type
