BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
-use Test::More tests => 145*$iters;
+use Test::More tests => 147*$iters;
use Catalyst::Test 'TestApp';
if ( $ENV{CAT_BENCHMARK} ) {
'request with URI-encoded arg' );
like( $content, qr{foo/bar;\z}, 'args decoded' );
}
+ {
+ ok( my $content =
+ get('http://localhost/chained/return_arg_decoded/foo%2Fbar%3B'),
+ 'request with URI-encoded arg' );
+ like( $content, qr{foo/bar;\z}, 'args decoded' );
+ }
}
+
use strict;
use warnings;
+use HTML::Entities;
+
use base qw/Catalyst::Controller/;
sub begin :Private { }
sub doc_star : Chained('/') PathPart('chained/doc') Args(1) {}
sub return_arg : Chained('/') PathPart('chained/return_arg') Args(1) {}
+sub return_arg_decoded : Chained('/') PathPart('chained/return_arg_decoded') Args(1) {
+ my ($self, $c) = @_;
+ $c->req->args([ map { decode_entities($_) } @{ $c->req->args }]);
+}
+
sub end :Private {
my ($self, $c) = @_;