From: Marcus Ramberg Date: Wed, 24 Nov 2004 23:32:43 +0000 (+0000) Subject: Fixed ordering of Dave's parse_location patch X-Git-Tag: 2.10~73 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=c335fbb1eaabf2ada28ce78f69299a96b33f3759;p=maypole.git Fixed ordering of Dave's parse_location patch 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 --- diff --git a/Changes b/Changes index 2267a13..5212f55 100644 --- 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) diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index e14e40e..cd4e96d 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -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; diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index 9233163..39514f9 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -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; }