Skip Menu |

This queue is for tickets about the HTTP-Message CPAN distribution.

Report information
The Basics
Id: 86272
Status: resolved
Priority: 0/
Queue: HTTP-Message

Owner: Nobody in particular
Requestors: p.gackiewicz [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)


Subject: bug in HTTP::Message::decoded_content()
Date: Thu, 20 Jun 2013 10:17:32 +0200 (CEST)
To: bug-HTTP-Message [...]
From: Piotr Gackiewicz <p.gackiewicz [...]>
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 - niezawodne serwery wirtualne - tanie domeny internetowe

Message body is not shown because sender requested not to inline it.

I can't see anything wrong with the current code.  The inner call to decoded_content shouid never recurse further as it's called with charset => none.

Can you provide a small test case that demonstrates infinite recursion?  I wasn't able to reproduce any bad behaviour on my own.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to