Skip to content

Commit 38dbf2e

Browse files
committed
add test for rt #81948
1 parent bcc46ce commit 38dbf2e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

t/apache.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@ use LWP::UserAgent;
88
my $ua = LWP::UserAgent->new();
99
plan skip_all => "Not online" unless $ua->is_online;
1010

11-
plan tests => 2;
11+
plan tests => 4;
12+
1213
my $res = $ua->simple_request(HTTP::Request->new(GET => "https://www.apache.org"));
1314

1415
ok($res->is_success);
1516
like($res->content, qr/Apache Software Foundation/);
1617

18+
# test for RT #81948
19+
my $warn = '';
20+
$SIG{__WARN__} = sub { $warn = shift };
21+
$ua = LWP::UserAgent->new( ssl_opts => {verify_hostname => 0} );
22+
$res = $ua->simple_request(HTTP::Request->new(GET => "https://www.apache.org"));
23+
ok($res->is_success);
24+
is($warn, '', "no warning seen");
25+
1726
$res->dump(prefix => "# ");

0 commit comments

Comments
 (0)