Permalink
Browse files

Use the helper method to decide if there is a trailing_slash

Who knew, there was a helper for that.  How handy!
  • Loading branch information...
1 parent 043c1b5 commit 364434f1394480c77c686677f56471ff4ae18065 @afresh1 committed Dec 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 OpenBSDtracker
View
@@ -101,7 +101,7 @@ app->hook( before_dispatch => sub {
my $rel = $stash->{path} || $tx->req->url->path->clone->canonicalize;
# Append the default file (that I want) if there is a trailing /
- $rel .= $default_file if substr( $rel, -1 ) eq '/';
+ $rel .= $default_file if $tx->req->url->path->trailing_slash;
for my $path ( @{ app->static->paths } ) {
my $file = catfile $path, split( '/', $rel );

0 comments on commit 364434f

Please sign in to comment.