my @parts = split('/', $path);
my ($chain, $captures, $parts) = $self->recurse_match($c, '/', \@parts);
- push @{$request->args}, @$parts if $parts && @$parts;
+
+ if ($parts && @$parts) {
+ for my $arg (@$parts) {
+ $arg =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
+ push @{$request->args}, $arg;
+ }
+ }
return 0 unless $chain;
ok( my $content =
get('http://localhost/chained/return_arg/foo%2Fbar%3B'),
'request with URI-encoded arg' );
- # this is the CURRENT behavior
- like( $content, qr{foo%2Fbar%3B\z}, 'args NOT decoded' );
+ like( $content, qr{foo/bar;\z}, 'args decoded' );
}
}