From a4e2e344728b5642814877ff908d90d308c33032 Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 15 Aug 2022 08:41:10 -0400 Subject: Fix redirection bug --- gmi.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gmi.pl') diff --git a/gmi.pl b/gmi.pl index 2ccb072..b292ba2 100755 --- a/gmi.pl +++ b/gmi.pl @@ -7,7 +7,7 @@ use warnings; use 5.010; #use diagnostics; -our $VERSION = 'v0.0.4'; +our $VERSION = 'v0.0.5'; # Modules use IO::Socket::SSL; # CPAN @@ -405,8 +405,8 @@ while () { } elsif (-d $doc_loc) { # make sure 'dir' is 'dir/' - if (substr($doc_loc,-1,1) ne '/') { - speak($cl, 'redirect', "$path/"); + if (substr($doc_loc,-1,1) ne '/') { + speak($cl, 'redirect', @{ split_url_path($path, 256) }[-1]. "/"); goto CLOSE; } -- cgit v1.2.3