]> git.mxchange.org Git - friendica.git/commitdiff
allow hosts to be validated even if ipv6 fails
authorMatthew Exon <git.mexon@spamgourmet.com>
Sat, 6 Jan 2024 22:56:11 +0000 (23:56 +0100)
committerMatthew Exon <git.mexon@spamgourmet.com>
Sat, 6 Jan 2024 22:56:11 +0000 (23:56 +0100)
src/Network/HTTPClient/Client/HttpClient.php

index 9d0638a8efe2364d62e1bfbc5c96b45915fed3e1..bc86579f6d481eef7bea84fdd0495c537a99c9c6 100644 (file)
@@ -73,7 +73,7 @@ class HttpClient implements ICanSendHttpRequests
                        throw new \InvalidArgumentException('Unable to retrieve the host in URL: ' . $url);
                }
 
-               if(!filter_var($host, FILTER_VALIDATE_IP) && !@dns_get_record($host . '.', DNS_A + DNS_AAAA)) {
+               if(!filter_var($host, FILTER_VALIDATE_IP) && !@dns_get_record($host . '.', DNS_A) && !@dns_get_record($host . '.', DNS_AAAA)) {
                        $this->logger->debug('URL cannot be resolved.', ['url' => $url]);
                        $this->profiler->stopRecording();
                        return CurlResult::createErrorCurl($this->logger, $url);