don't assume we got an answer

parent 07012ff7
......@@ -221,8 +221,8 @@ sub check_gtld_conformance {
# Implementation Guide - RDAP Protocol - 1.8: RDAP services MUST be available over both IPv4 and IPv6 transport.
my $v4answer = $resolver->query($host, 'A');
my $v6answer = $resolver->query($host, 'AAAA');
my $v4count = scalar(grep { 'A' eq $_->type } $v4answer->answer);
my $v6count = scalar(grep { 'AAAA' eq $_->type } $v6answer->answer);
my $v4count = scalar(grep { 'A' eq $_->type } ($v4answer ? $v4answer->answer : ()));
my $v6count = scalar(grep { 'AAAA' eq $_->type } ($v6answer ? $v6answer->answer : ()));
if ($v4count > 0 && $v6count > 0) {
pass('RDAP service is available over both IPv4 and IPv6');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment