]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/CGI/Maypole.pm
updated changelog, fixed mistake in CGI::Maypole
[maypole.git] / lib / CGI / Maypole.pm
index 4724a1b532d64625de4bcd3b8ba8c8759a2de731..dda15fcd7a52df6c8dabd3616b4bb22223d1e77a 100644 (file)
@@ -92,12 +92,18 @@ sub parse_location
         $r->headers_in->set($field_name => $cgi->http($http_header));
     }
 
+    $r->preprocess_location();
+
     my $path = $cgi->url( -absolute => 1, -path_info => 1 );
     my $loc = $cgi->url( -absolute => 1 );
     {
         no warnings 'uninitialized';
         $path .= '/' if $path eq $loc;
-        $path =~ s/^($loc)?\///;
+       if ($loc =~ /\/$/) {
+         $path =~ s/^($loc)?//;
+       } else {
+         $path =~ s/^($loc)?\///;
+       }
     }
     $r->path($path);