Lets skip the decoding process (like we do for encoding in
finalize_headers) for apps not using core encoding support,
that is, when "encoding" config bit is undef.
$c->next::method(@_);
my $enc = $c->encoding;
+ return unless $enc;
for my $key (qw/ parameters query_parameters body_parameters /) {
for my $value ( values %{ $c->request->{$key} } ) {
my $ret = $c->next::method(@_);
+ my $enc = $c->encoding;
+ return $ret unless $enc;
+
foreach (@{$c->req->arguments}, @{$c->req->captures}) {
$_ = $c->_handle_param_unicode_decoding($_);
}
use HTTP::Request::Common;
use URI::Escape qw/uri_escape_utf8/;
use HTTP::Status 'is_server_error';
+use Data::Dumper;
my $encode_str = "\x{e3}\x{81}\x{82}"; # e38182 is japanese 'あ'
my $decode_str = Encode::decode('utf-8' => $encode_str);
is $myparam => $encode_str;
}
- is scalar(@TestLogger::ELOGS), 2
+ is scalar(@TestLogger::ELOGS), 0
or diag Dumper(\@TestLogger::ELOGS);
- like $TestLogger::ELOGS[0], qr/method \"decode\"/;
}
done_testing;