rack/rack — pull request #403 by trans (2012-07-07 03:23:27+00:00)
Title: Refactor Rack::Static and improve directory index support

This patch makes the the Rack::Static code a little more efficient and readable. At the same time it adds support for *existent* directory index support --instead of just checking for a trailing `/`, failing that it will check to see if the the path is an actual directory on disk. This is indispensable in some use cases where a trailing slash can not be insured, but the directories index file still needs to be served.

If necessary I can add a new configuration option to conditionally support this new directory behavior, but I did not do so presently b/c I suspect it would be a YAGNI.