[Catalyst-commits] r12609 - in Catalyst-Runtime/5.80/branches/psgi:
lib/Catalyst t/aggregate
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Mon Jan 11 22:23:56 GMT 2010
Author: rafl
Date: 2010-01-11 22:23:56 +0000 (Mon, 11 Jan 2010)
New Revision: 12609
Modified:
Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm
Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_escaped_path.t
Log:
Canonicalize the url becuse we're building it from the always-undecoded REQUEST_URI, not PATH_INFO.
Modified: Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm 2010-01-11 22:23:49 UTC (rev 12608)
+++ Catalyst-Runtime/5.80/branches/psgi/lib/Catalyst/Engine.pm 2010-01-11 22:23:56 UTC (rev 12609)
@@ -537,7 +537,7 @@
my $query = $env->{QUERY_STRING} ? '?' . $env->{QUERY_STRING} : '';
my $uri = $scheme . '://' . $host . '/' . $path . $query;
- $ctx->request->uri( bless \$uri, $uri_class );
+ $ctx->request->uri( (bless \$uri, $uri_class)->canonical );
# set the base URI
# base must end in a slash
Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_escaped_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_escaped_path.t 2010-01-11 22:23:49 UTC (rev 12608)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_escaped_path.t 2010-01-11 22:23:56 UTC (rev 12609)
@@ -18,11 +18,7 @@
# test that request with URL-escaped code works.
{
- my $response = request('http://localhost/args/param%73/one/two', {
- extra_env => { PATH_INFO => '/args/param%73/one/two' },
- });
-
- ok( $response );
+ ok( my $response = request('http://localhost/args/param%73/one/two') );
ok( $response->is_success, 'Response Successful 2xx' );
is( $response->content, 'onetwo' );
}
More information about the Catalyst-commits
mailing list