10 use Catalyst::Test 'TestAppWithoutUnicode';
12 use HTTP::Request::Common;
13 use URI::Escape qw/uri_escape_utf8/;
14 use HTTP::Status 'is_server_error';
17 my $encode_str = "\x{e3}\x{81}\x{82}"; # e38182 is japanese 'あ'
18 my $decode_str = Encode::decode('utf-8' => $encode_str);
19 my $escape_str = uri_escape_utf8($decode_str);
21 # JNAP - I am removing this test case because I think its not correct. I think
22 # we do not check the server encoding to determine if the parts of a request URL
23 # both paths and query should be decoded. I think its always safe to assume utf8
24 # encoded urlencoded bits. That is my reading of the spec. Please correct me if
26 #check_parameter(GET "/?myparam=$escape_str");
27 check_parameter(POST '/',
28 Content_Type => 'form-data',
31 "$Bin/unicode_plugin_no_encoding.t",
32 "$Bin/unicode_plugin_request_decode.t",
38 my ( undef, $c ) = ctx_request(shift);
40 my $myparam = $c->req->param('myparam');
41 unless ( $c->request->method eq 'POST' ) {
42 is $c->res->output => $encode_str;
43 is $myparam => $encode_str;
46 is scalar(@TestLogger::ELOGS), 0
47 or diag Dumper(\@TestLogger::ELOGS);