Delete trailing ending slash to portal URL (#1455)

This commit is contained in:
Christophe Maudoux 2018-06-16 10:05:11 +02:00
parent d2f8b7d6ae
commit 857f1c787f

View File

@ -41,8 +41,15 @@ sub tests {
# Check if portal URL is well formated
portalURL => sub {
# Checking for ending slash
$conf->{portal} .= '/'
unless ( $conf->{portal} =~ /^.*\/$/ );
unless ( $conf->{portal} =~ qr#/$# );
# Deleting trailing ending slash
my $regex = qr#/+$#;
$conf->{portal} =~ s/$regex/\//;
return 1;
},