Commit 468d6fdd authored by Yadd's avatar Yadd
Browse files

Render endpoint case insensitive (Fixes #2147)

parent 557fa3f7
Pipeline #8297 failed with stage
in 14 minutes and 13 seconds
......@@ -55,6 +55,7 @@ sub genRoute {
else {
$dest ||= $word;
}
$word = lc $word;
if ( $dest =~ /^(.+)\.html$/ ) {
my $tpl = $1 or die;
$self->logger->debug("route $dest will use $tpl");
......@@ -144,6 +145,7 @@ sub handler {
sub followPath {
my ( $self, $req, $routes, $path ) = @_;
$path->[0] = lc $path->[0] if $path->[0];
if ( $path->[0] and defined $routes->{ $path->[0] } ) {
my $w = shift @$path;
if ( ref( $routes->{$w} ) eq 'CODE' ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment