From 46d9ddb85d36944fab2cdd9499ee4ee6785d311a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 7 May 2014 17:17:22 +0200 Subject: [PATCH] Redirect to lowercase Should fix #13 --- public/vroom.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/vroom.pl b/public/vroom.pl index 966db76..57610e3 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -255,7 +255,7 @@ post '/create' => sub { ); } else{ - $self->redirect_to('/'.$name); + $self->redirect_to($self->url_for('/') . $name); } }; @@ -275,6 +275,10 @@ post '/localize' => sub { get '/(*room)' => sub { my $self = shift; my $room = $self->stash('room'); + # Redirect to lower case + if ($room ne lc $room){ + $self->redirect_to($self->url_for('/') . lc $room); + } $self->delete_rooms; # Not auth yet, probably a guest $self->login;