]> git.decadent.org.uk Git - maypole.git/commitdiff
Fixed ordering of Dave's parse_location patch
authorMarcus Ramberg <mramberg@cpan.org>
Wed, 24 Nov 2004 23:32:43 +0000 (23:32 +0000)
committerMarcus Ramberg <mramberg@cpan.org>
Wed, 24 Nov 2004 23:32:43 +0000 (23:32 +0000)
applied the parse_location patch to Apache::MVC as well.

git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@291 48953598-375a-da11-a14b-00016c27c3ee

Changes
lib/Apache/MVC.pm
lib/CGI/Maypole.pm

diff --git a/Changes b/Changes
index 2267a137c8a4e5a0f94f0b3299da593fb6bb3022..5212f55c4f213f13c99c6b8e13052f8622da4fa1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,6 +2,7 @@ Revision history for Perl extension Maypole
 
 2.05  Tue Oct 28 20:00:00 2004
     - fixed a bug in CGI::Maypole::parse_location() (Dave Howorth)
+    - Also applied that fix to Apache::MVC (Marcus Ramberg)
     - some fixes for Maypole::Config, Maypole::Model::Base and
       Maypole::Model::CDBI::Plain (Dave Howorth)
     - Added Apache::RequestIO to Apache::MVC (michael@diaspora.gen.nz)
index e14e40e266a9fccca0896085b4f9b6155727f694..cd4e96d2fc0550af8a0cdf7d6f007148a284257f 100644 (file)
@@ -30,6 +30,7 @@ sub parse_location {
     $self->{path} = $self->{ar}->uri;
     my $loc = $self->{ar}->location;
     no warnings 'uninitialized';
+    $self->{path} .= '/' if $self->{path} eq $loc;
     $self->{path} =~ s/^($loc)?\///;
     $self->parse_path;
     $self->parse_args;
index 923316329c9ace54d5933314c2dd70bb566d2832..39514f97cb763550eb03f46451fcaaaeb36a4597 100644 (file)
@@ -21,8 +21,8 @@ sub parse_location {
     $self->{path} = $self->{cgi}->url( -absolute => 1, -path_info => 1 );
     my $loc = $self->{cgi}->url( -absolute => 1 );
     no warnings 'uninitialized';
-    $self->{path} =~ s/^($loc)?\///;
     $self->{path} .= '/' if $self->{path} eq $loc;
+    $self->{path} =~ s/^($loc)?\///;
     $self->parse_path;
     $self->parse_args;
 }