X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestAppEncoding%2FController%2FRoot.pm;h=1c42bfa4ea93291826140b2a21a89f0f291770ad;hb=1f8714f6b46737c093c930ee6e35a02345e6bd8c;hp=a8987fb8719023d262ed8a4924983a12f9da3f88;hpb=d9669e44bfc7fb3b6e6ed662c422a60a41c74458;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestAppEncoding/Controller/Root.pm b/t/lib/TestAppEncoding/Controller/Root.pm index a8987fb..1c42bfa 100644 --- a/t/lib/TestAppEncoding/Controller/Root.pm +++ b/t/lib/TestAppEncoding/Controller/Root.pm @@ -8,7 +8,8 @@ __PACKAGE__->config->{namespace} = ''; sub binary : Local { my ($self, $c) = @_; - $c->res->body(do { + $c->res->content_type('image/gif'); + $c->res->body(do { open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; binmode($fh); local $/ = undef; <$fh>; @@ -31,12 +32,8 @@ sub utf8_non_ascii_content : Local { my $str = 'ʇsʎlɐʇɐɔ'; # 'catalyst' flipped at http://www.revfad.com/flip.html ok utf8::is_utf8($str), '$str is in UTF8 internally'; - - # encode $str into a sequence of octets and turn off the UTF-8 flag, so that - # we don't get the 'Wide character in syswrite' error in Catalyst::Engine - utf8::encode($str); - ok !utf8::is_utf8($str), '$str is a sequence of octets (byte string)'; - + + $c->res->content_type('text/plain'); $c->res->body($str); }