Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: johan [...] headweb.com
Cc:
AdminCc:

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



Subject: POE::Component::Client::HTTP spurious warnings with SSLify
Date: Wed, 9 Jun 2010 10:57:48 +0200
To: bug-POE-Component-Client-HTTP [...] rt.cpan.org
From: Johan Ström <johan [...] headweb.com>
Download (untitled) / with headers
text/plain 388b
POE/Component/Client/HTTP.pm line 344 my $peer_addr = getpeername($new_wheel->get_input_handle()); getpeername is not valid on a SSLifyed socket; it yields getpeername() on unopened socket GEN46 at /usr/lib/perl5/site_perl/ 5.8.8/POE/Component/Client/HTTP.pm line 344. See http://search.cpan.org/dist/POE-Component-SSLify/lib/POE/Component/SSLify.pm#Socket_methods_doesn%27t_work
From: yikes2000 [...] yahoo.com
Download (untitled) / with headers
text/plain 913b
This patch should fix it... --- HTTP.pm.orig 2010-02-14 22:19:05.000000000 -0800 +++ HTTP.pm 2010-07-23 08:39:16.000000000 -0700 @@ -18,6 +18,7 @@ use POE::Component::Client::HTTP::RequestFactory; use POE::Component::Client::HTTP::Request qw(:states :fields); +use POE::Component::SSLify qw( SSLify_GetSocket ); BEGIN { local $SIG{'__DIE__'} = 'DEFAULT'; @@ -341,7 +342,10 @@ $request->[REQ_CONNECTION] = $connection; - my $peer_addr = getpeername($new_wheel->get_input_handle()); + #my $peer_addr = getpeername($new_wheel->get_input_handle()); + my $socket = $new_wheel->get_input_handle(); + my $peer_addr = $request->scheme ne 'https' ? getpeername($socket) : + getpeername( SSLify_GetSocket($socket) ); if (defined $peer_addr) { my ($port, $iaddr) = sockaddr_in($peer_addr); $request->[REQ_PEERNAME] = inet_ntoa($iaddr) . "." . $port;
Subject: HTTP.pm.diff
Download HTTP.pm.diff
text/x-diff 872b
--- HTTP.pm.orig 2010-02-14 22:19:05.000000000 -0800 +++ HTTP.pm 2010-07-23 08:39:16.000000000 -0700 @@ -18,6 +18,7 @@ use POE::Component::Client::HTTP::RequestFactory; use POE::Component::Client::HTTP::Request qw(:states :fields); +use POE::Component::SSLify qw( SSLify_GetSocket ); BEGIN { local $SIG{'__DIE__'} = 'DEFAULT'; @@ -341,7 +342,10 @@ $request->[REQ_CONNECTION] = $connection; - my $peer_addr = getpeername($new_wheel->get_input_handle()); + #my $peer_addr = getpeername($new_wheel->get_input_handle()); + my $socket = $new_wheel->get_input_handle(); + my $peer_addr = $request->scheme ne 'https' ? getpeername($socket) : + getpeername( SSLify_GetSocket($socket) ); if (defined $peer_addr) { my ($port, $iaddr) = sockaddr_in($peer_addr); $request->[REQ_PEERNAME] = inet_ntoa($iaddr) . "." . $port;
Download (untitled) / with headers
text/plain 156b
Thanks very much for the report! Thanks even *MORE* for the patch :) It should be resolved in the next release, which I expect to be soon. -- ~Apocalypse
Patch applied, thanks!


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.