[Catalyst-commits] r12081 -
Catalyst-Runtime/5.80/branches/fix_path_info_decoding/t/aggregate
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Mon Nov 30 20:44:17 GMT 2009
Author: t0m
Date: 2009-11-30 20:44:16 +0000 (Mon, 30 Nov 2009)
New Revision: 12081
Modified:
Catalyst-Runtime/5.80/branches/fix_path_info_decoding/t/aggregate/live_engine_request_escaped_path.t
Log:
And yea, these test cases now pass
Modified: Catalyst-Runtime/5.80/branches/fix_path_info_decoding/t/aggregate/live_engine_request_escaped_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/fix_path_info_decoding/t/aggregate/live_engine_request_escaped_path.t 2009-11-30 20:37:19 UTC (rev 12080)
+++ Catalyst-Runtime/5.80/branches/fix_path_info_decoding/t/aggregate/live_engine_request_escaped_path.t 2009-11-30 20:44:16 UTC (rev 12081)
@@ -13,7 +13,7 @@
This test exposes a problem in the handling of PATH_INFO in C::Engine::CGI (and
other engines) where Catalyst does not un-escape the request correctly.
-If a request is URL-encoded then Catalyst fails to decode the request
+If a request is URL-encoded then Catalyst fails to decode the request
and thus will try and match actions using the URL-encoded value.
Can NOT use Catalyst::Test as it uses HTTP::Request::AsCGI which does
@@ -31,11 +31,11 @@
@@ -157,6 +157,8 @@
my $query = $ENV{QUERY_STRING} ? '?' . $ENV{QUERY_STRING} : '';
my $uri = $scheme . '://' . $host . '/' . $path . $query;
-
+
+ $uri = URI->new( $uri )->canonical;
+
$c->request->uri( bless \$uri, $uri_class );
-
+
# set the base URI
=cut
@@ -54,6 +54,7 @@
}
# test that request with URL-escaped code works.
+{
my $request = Catalyst::Utils::request( 'http://localhost/args/param%73/one/two' );
my $cgi = HTTP::Request::AsCGI->new( $request, %ENV )->setup;
@@ -65,8 +66,6 @@
TestApp->handle_request( env => \%ENV );
ok( my $response = $cgi->restore->response );
-TODO: {
- local $TODO = 'Actions should match when path parts are url encoded';
ok( $response->is_success, 'Response Successful 2xx' );
is( $response->content, 'onetwo' );
}
More information about the Catalyst-commits
mailing list