The other thing is redirectToSlash, which is enabled by default. If not 
turned off when using defaultExtension, links cut and pasted from the 
browser location bar wouldn't validate as clean-urls/defaultExtension.
If this bit of logic is removed, should defaultExtension automatically 
set redirectoToSlash to false?

On 2014-02-11 3:24 AM, Eran Hammer wrote:
>
> In lib/directory.js:
>
> > @@ -78,6 +78,19 @@ exports.handler = function (route, options) {
> >
> >          Async.forEachSeries(paths, function (path, next) {
> >
> > +            // Construct path if default extension set
> > +            if (settings.defaultExtension) {
> > +
> > +                var fileName = selection;
> > +
> > +                if (fileName.lastIndexOf('/') === fileName.length - 1) {
> > +                    fileName = fileName.slice(0, -1);
>
> I'm not following the logic of turning an explicit directory to a 
> file. Replacing default/ with default.html makes no sense to me.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/spumko/hapi/pull/1383/files#r9616171>.
>