[Catalyst] Parsing of undecoded UTF-32 at /home/davidw/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Catalyst/Test.pm

Bill Moseley moseley at hank.org
Thu Aug 16 01:45:56 GMT 2012


http://cpansearch.perl.org/src/BOBTFISH/Catalyst-Runtime-5.90015/lib/Cataly=
st/Test.pm


In the "mangle_response" sub the code does this:

require HTML::HeadParser;

my $parser =3D HTML::HeadParser->new();
$parser->xml_mode(1) if $resp->content_is_xhtml;
$parser->utf8_mode(1) if $] >=3D 5.008 && $HTML::Parser::VERSION >=3D 3.40;

$parser->parse( $resp->content );


Shouldn't that code check that the content-type is HTML before attempting
to parse?

For example, this response was causing problems:

Cache-Control: no-store, no-cache, must-revalidate
Content-Length: 24043
Content-Type: audio/mp4a-latm
Expires: Wed, 31 Dec 1969 23:59:59 GMT
Content-Disposition: attachment; filename*=3DUTF-8''trumpet.m4a


(Warnings are fatal): Parsing of undecoded UTF-32 at
/home/moseley/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Catalys=
t/Test.pm
line 314.


-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120815/b30e1=
d2c/attachment.htm


More information about the Catalyst mailing list