HTTPMicro: Inline part of IO::Socket::SSL for cases when the local version of the module isn't high enough to support ->verify_hostname(), like in centos5

This commit is contained in:
Brian Fraser
2012-09-24 16:24:36 -03:00
parent 484fcb6a2f
commit 5594f2e64c
20 changed files with 3493 additions and 46 deletions

View File

@@ -20,15 +20,16 @@ if ( $EVAL_ERROR ) {
}
# Need a simple URL that won't try to do chunking.
my $test_url = "http://www.percona.com/robots.txt";
my $tiny = HTTP::Tiny->new(max_redirect => 0)->request('GET', $test_url);
my $micro = HTTPMicro->new->request('GET', $test_url);
for my $test_url ( "http://www.percona.com/robots.txt", "https://v.percona.com" ) {
my $tiny = HTTP::Tiny->new(max_redirect => 0)->request('GET', $test_url);
my $micro = HTTPMicro->new->request('GET', $test_url);
is_deeply(
$micro->{content},
$tiny->{content},
"HTTPMicro behaves like HTTP::Tiny (max_redirect=0)"
);
is_deeply(
$micro->{content},
$tiny->{content},
"HTTPMicro behaves like HTTP::Tiny (max_redirect=0)"
);
}
done_testing;
exit;