From: Andy Grundman Date: Tue, 11 Oct 2005 22:12:58 +0000 (+0000) Subject: Fixed path, can now be changed properly, also updated test for this X-Git-Tag: 5.7099_04~1225 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=79f8efb873b3bb1d33f156969a5ce5c95d28f4cf Fixed path, can now be changed properly, also updated test for this --- diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index ace44c7..b38b693 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -331,9 +331,6 @@ sub path { my ( $self, $params ) = @_; if ($params) { - - # base must always have a trailing slash - $params .= '/' unless ( $params =~ /\/$/ ); $self->uri->path($params); } diff --git a/t/live/engine/request/uri.t b/t/live/engine/request/uri.t index a6c6b38..8d91502 100644 --- a/t/live/engine/request/uri.t +++ b/t/live/engine/request/uri.t @@ -17,7 +17,7 @@ my $creq; ok( my $response = request('http://localhost/engine/request/uri/change_path'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); - like( $creq->uri, qr{/my/app/lives/here}, 'URI contains new path' ); + like( $creq->uri, qr{/my/app/lives/here$}, 'URI contains new path' ); } # test that path properly removes the base location