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;
}