Subject: | bug in HTTP::Message::decoded_content() |
Date: | Thu, 20 Jun 2013 10:17:32 +0200 (CEST) |
To: | bug-HTTP-Message [...] rt.cpan.org |
From: | Piotr Gackiewicz <p.gackiewicz [...] intertele.pl> |
Hi.
I think there is a bug in decoded_content() function in this package.
In version 6.06, it evals such piece of code:
if ($self->content_is_text || (my $is_xml = $self->content_is_xml)) {
my $charset = lc(
$opt{charset} ||
$self->content_type_charset ||
$opt{default_charset} ||
$self->content_charset || # <=============
"ISO-8859-1"
);
...
but content_charset() calls decoded_content() again, creating circular
dependency. Evaled code silently dies then. If it is not logical error,
this code should be probably rewritten.
I found it trying to install CPAN XML::Twig code. It did not pass several
tests using LWP::Simple, loading simple HTML via file: url.
Simple patch attached, removing this call.
Regards,
--
Piotr Gackiewicz
Intertele S.A. - operator systemów ITL.PL i DOMENY.ITL.PL
al. T. Rejtana 10, 35-310 Rzeszów
TEL: +48 17 8507580, FAX: +48 17 8520275
http://www.itl.pl - niezawodne serwery wirtualne
http://domeny.itl.pl - tanie domeny internetowe
http://www.intertele.pl
Message body is not shown because sender requested not to inline it.