senchalabs/connect — pull request #929 by dougwilson (2013-10-17 14:32:07+00:00)
Title: Fix directory middleware to properly work with '.'

This fixes the `directory` middleware to properly work when the directory is set to `'.'`. Before it incorrectly allowed users to climb the entire directory tree outside the directory. This also does *not* use `path.resolve` to work where a server cannot stat it's own parent directory (sort of common practice).

Fixes #771