Skip Menu |

This queue is for tickets about the POE-Component-Client-HTTP CPAN distribution.

Report information
The Basics
Id: 60811
Status: resolved
Priority: 0/
Queue: POE-Component-Client-HTTP

Owner: Nobody in particular
Requestors: jleader [...]

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

Subject: Warning from Net::DNS for bogus redirect
Download (untitled) / with headers
text/plain 765b
In some cases, a bad Location: header in a redirect (with a bogus too-long hostname) will cause Net::DNS to issue a warning: de|wipeadclick=201002263072+-+Kopfbanner/2010/Sutter/Diverse/Br... truncated to 63 octets (RFC1035 2.3.1) at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Net/DNS/ line 237 With older versions of DNS::Question (< 0.60), this produced a croak instead of a carp. This is with the following versions: POE: 1.292 POE::Component::Client::HTTP: 0.895 POE::Component::Client::DNS: 1.051 Net::DNS: 0.66 on Perl: This is perl, v5.8.8 built for x86_64-linux-thread-multi and uname -a: Linux 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
text/x-perl 1.4k
#!/usr/bin/perl use POE qw(Component::Client::HTTP); use HTTP::Request::Common qw(GET); my @urls = ( '', '|wipeadclick=201002263072+-+Kopfbanner%2F2010%2FSutter%2FDiverse%2FBrot+f%FCr+die+Welt', ); POE::Session->create( inline_states => { _start => sub { POE::Component::Client::HTTP->spawn( Alias => 'ua', FollowRedirects => 3, ); $poe_kernel->sig(DIE => 'die'); foreach my $url (@urls) { print "Requesting $url\n"; $poe_kernel->post('ua', 'request', 'response', GET $url); } }, response => sub { my ($req, $resp) = @_[ARG0, ARG1]; print 'Got ', $req->[0]->uri, ' ', $resp->[0]->status_line, "\n"; }, die => sub { my ($error_str, $dest_session, $event, $source_session, $from_state, $file, $line) = @{$_[ARG1]}{ qw(error_str dest_session event source_session from_state file line) }; print "Died: $error_str"; print "File: $file, Line $line\n"; print "Event: $event, From state: $from_state\n"; print 'Dest session: ', $dest_session->ID, "\n"; print 'Source Session: ', $source_session->ID, "\n"; }, }, ); $poe_kernel->run();
From: jleader [...]
The change to Net::DNS to truncate and carp instead of croaking was RT #26957.
Download (untitled) / with headers
text/plain 118b
The next release of POE::Component::Client::HTTP will not use POE::Component::Client::DNS (nor Net::DNS by extension).

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

Please report any issues with to