diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm index b1e0655d9a32073c2c42e93324dcc94e5fe87c22..ccebb2004cc142c0fb775245e7632aecd504303e 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm @@ -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' ) {