X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Funicode_plugin_no_encoding.t;h=feed6810c8a7340c868b594b71824a6bf8387cb4;hp=8034c3840955c11531ba5896d52465d1f650c277;hb=161710a39409d2afd256463471b8014a1c69adf4;hpb=1a87d45c9c78b4b0a27dfeef4c04d1a9a6956b4d diff --git a/t/unicode_plugin_no_encoding.t b/t/unicode_plugin_no_encoding.t index 8034c38..feed681 100644 --- a/t/unicode_plugin_no_encoding.t +++ b/t/unicode_plugin_no_encoding.t @@ -1,5 +1,3 @@ -#!/usr/bin/env perl - use strict; use warnings; use Test::More; @@ -20,7 +18,12 @@ my $encode_str = "\x{e3}\x{81}\x{82}"; # e38182 is japanese 'あ' my $decode_str = Encode::decode('utf-8' => $encode_str); my $escape_str = uri_escape_utf8($decode_str); -check_parameter(GET "/?myparam=$escape_str"); +# JNAP - I am removing this test case because I think its not correct. I think +# we do not check the server encoding to determine if the parts of a request URL +# both paths and query should be decoded. I think its always safe to assume utf8 +# encoded urlencoded bits. That is my reading of the spec. Please correct me if +# I am wrong +#check_parameter(GET "/?myparam=$escape_str"); check_parameter(POST '/', Content_Type => 'form-data', Content => [ @@ -35,7 +38,6 @@ sub check_parameter { my ( undef, $c ) = ctx_request(shift); my $myparam = $c->req->param('myparam'); - ok !utf8::is_utf8($myparam); unless ( $c->request->method eq 'POST' ) { is $c->res->output => $encode_str; is $myparam => $encode_str;