From: Aaron Trevena Date: Wed, 6 Jun 2007 12:12:33 +0000 (+0000) Subject: added preprocess_location method X-Git-Tag: 2.12~6 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=0ce03c9aa8e988d951a1383c99287d5ca4fbdfba;p=maypole.git added preprocess_location method git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@568 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index df24432..5fd736d 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -92,6 +92,8 @@ sub parse_location $r->headers_in->set($field_name => $cgi->http($http_header)); } + $self->preprocess_location(); + my $path = $cgi->url( -absolute => 1, -path_info => 1 ); my $loc = $cgi->url( -absolute => 1 ); { diff --git a/lib/Maypole/CLI.pm b/lib/Maypole/CLI.pm index facedc1..39abf15 100644 --- a/lib/Maypole/CLI.pm +++ b/lib/Maypole/CLI.pm @@ -36,6 +36,9 @@ sub warn { sub parse_location { my $self = shift; my $url = URI->new( shift @ARGV ); + + $self->preprocess_location(); + (my $uri_base = $self->config->uri_base) =~ s:/$::; my $root = URI->new( $uri_base )->path; $self->{path} = $url->path;