From ec6799b6896d23dd7bc7c2d7fc6cb2ba3703e231 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Mon, 6 Nov 2006 11:21:17 +0000 Subject: [PATCH] applied parse_path fix to CGI::Maypole git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@548 48953598-375a-da11-a14b-00016c27c3ee --- Changes | 2 +- lib/CGI/Maypole.pm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 0856469..5656909 100644 --- 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 - 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 diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index 4724a1b..df24432 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -97,7 +97,11 @@ sub parse_location { no warnings 'uninitialized'; $path .= '/' if $path eq $loc; - $path =~ s/^($loc)?\///; + if ($loc =~ /\/$/) { + $path =~ s/^($loc)?//; + } else { + $path =~ s/^($loc)?\///; + } } $r->path($path); -- 2.39.5