]> git.decadent.org.uk Git - maypole.git/commitdiff
applied parse_path fix to CGI::Maypole
authorAaron Trevena <aaron.trevena@gmail.com>
Mon, 6 Nov 2006 11:21:17 +0000 (11:21 +0000)
committerAaron Trevena <aaron.trevena@gmail.com>
Mon, 6 Nov 2006 11:21:17 +0000 (11:21 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@548 48953598-375a-da11-a14b-00016c27c3ee

Changes
lib/CGI/Maypole.pm

diff --git a/Changes b/Changes
index 085646905f7fc2e6a6e0c6e1dcadd04cd9beb831..565690977c104f984ba76d33eb3bed3fc018868a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -18,7 +18,7 @@ For information about current developments and future releases, see:
    made DFV and FromCGI warn instead of die on unexpected cgi params
    added CGI params to TT error template
    small improvements to some factory templates
    made DFV and FromCGI warn instead of die on unexpected cgi params
    added CGI params to TT error template
    small improvements to some factory templates
-   fix to path handling in mod_perl when location ends in /
+   fix to path handling in mod_perl and CGI when location ends in /
 
 2.11 Mon 31 July 2006
 
 
 2.11 Mon 31 July 2006
 
index 4724a1b532d64625de4bcd3b8ba8c8759a2de731..df244326a4c6b497161c324678b27b6376aea0cc 100644 (file)
@@ -97,7 +97,11 @@ sub parse_location
     {
         no warnings 'uninitialized';
         $path .= '/' if $path eq $loc;
     {
         no warnings 'uninitialized';
         $path .= '/' if $path eq $loc;
-        $path =~ s/^($loc)?\///;
+       if ($loc =~ /\/$/) {
+         $path =~ s/^($loc)?//;
+       } else {
+         $path =~ s/^($loc)?\///;
+       }
     }
     $r->path($path);
     
     }
     $r->path($path);