Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: RJH [...] cpan.org
Cc:
AdminCc:

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



Subject: X-PCCH-Peer header is invalid when using PoCo::SSLify
For SSL queries, X-PCCH-Peer is set to 'error:Bad file descriptor' instead of IP.port. A test case is attached. An example response, querying google.com:443 - HTTP/1.1 301 Moved Permanently Cache-Control: public, max-age=2592000 Date: Thu, 13 Jan 2011 03:52:45 GMT Age: 31853 Location: https://mail.google.com/mail/ Server: sffe Content-Length: 226 Content-Type: text/html; charset=UTF-8 Expires: Sat, 12 Feb 2011 03:52:45 GMT X-Content-Type-Options: nosniff X-PCCH-Peer: error:Bad file descriptor X-XSS-Protection: 1; mode=block
Subject: testcase.pl
#!/usr/bin/perl use warnings; use strict; use HTTP::Request; use POE qw(Component::Client::HTTP); POE::Component::Client::HTTP->spawn( Alias => 'http', ); POE::Session->create( inline_states => { _start => \&_start, response => \&handle_response, }, ); $poe_kernel->run; exit 0; sub _start { my $request = HTTP::Request->new(GET => 'https://www.google.com:443'); $_[KERNEL]->post(http => 'request', 'response', $request); } sub handle_response { my $response = $_[ARG1][0]; print "X-PCCH-Peer: ", $response->header('X-PCCH-Peer'), "\n"; $_[KERNEL]->post(http => 'shutdown'); return; }
Passing the socket through SSLify_GetSocket before calling getpeerbyname() works. I'm just not sure where to add the code, since currently the code uses $wheel->get_input_handle().
On Thu Jan 13 08:33:58 2011, RJH wrote: Show quoted text
> Passing the socket through SSLify_GetSocket before calling > getpeerbyname() works. I'm just not sure where to add the code, since > currently the code uses $wheel->get_input_handle().
I've linked this ticket to #58265, which is the root cause of this. It should be resolved in the next release, which I expect to be soon. Thanks for reporting this! -- ~Apocalypse
Hello, v0.910 on CPAN includes the patch for this. Thanks again! -- ~Apocalypse