From: Matthew Exon Date: Sat, 6 Jan 2024 22:56:11 +0000 (+0100) Subject: allow hosts to be validated even if ipv6 fails X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1550ce2764e5237bb0895c01a1c7753ac75855e4;p=friendica.git allow hosts to be validated even if ipv6 fails --- diff --git a/src/Network/HTTPClient/Client/HttpClient.php b/src/Network/HTTPClient/Client/HttpClient.php index 9d0638a8ef..bc86579f6d 100644 --- a/src/Network/HTTPClient/Client/HttpClient.php +++ b/src/Network/HTTPClient/Client/HttpClient.php @@ -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);