diff options
Diffstat (limited to 'gmi.pl')
-rwxr-xr-x | gmi.pl | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -7,7 +7,7 @@ use warnings; use 5.010; #use diagnostics; -our $VERSION = 'v0.0.5'; +our $VERSION = 'v0.0.6'; # Modules use IO::Socket::SSL; # CPAN @@ -15,7 +15,7 @@ use IO::Socket::SSL::Utils; # CPAN use URL::XS qw(parse_url split_url_path parse_url_query); # CPAN #use Term::ANSIColor; # Core use Path::Naive qw(normalize_path); # CPAN -#use Smart::Comments; # CPAN +use Smart::Comments; # CPAN use URI::Encode qw(uri_encode); # CPAN use IO::Select; use TOML qw(from_toml); @@ -500,6 +500,11 @@ sub dir_listing { if (substr($i,0,1) eq '.') { # dont display hidden files next; } + + # convert space into %20 + # (there is probably an edge-case bug here) + $i =~ s/ /%20/g; + $doc .= "=> $i"; if (-d "$doc_loc/$i") { $doc .= '/'; @@ -543,6 +548,9 @@ sub get_request_in_vhost_root { # remove '..' $request =~ s/\.\.//g if ($request); + + # convert %20 into space + $request =~ s/%20/ /g if ($request); $r = normalize_path($request) if ($request); |