Redirect to lowercase

Should fix #13
master
Daniel Berteaud 11 years ago
parent 3b99238cbf
commit 46d9ddb85d
  1. 6
      public/vroom.pl

@ -255,7 +255,7 @@ post '/create' => sub {
); );
} }
else{ else{
$self->redirect_to('/'.$name); $self->redirect_to($self->url_for('/') . $name);
} }
}; };
@ -275,6 +275,10 @@ post '/localize' => sub {
get '/(*room)' => sub { get '/(*room)' => sub {
my $self = shift; my $self = shift;
my $room = $self->stash('room'); 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; $self->delete_rooms;
# Not auth yet, probably a guest # Not auth yet, probably a guest
$self->login; $self->login;

Loading…
Cancel
Save