enh: skip processing for empty response

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/40265/head
Daniel Kesselberg 9 months ago
parent 9878062862
commit c4286730fa
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614

@ -25,6 +25,7 @@ declare(strict_types=1);
*/
namespace OC\Http\Client;
use OCP\Http\Client\LocalServerException;
use Psr\Http\Message\RequestInterface;
class DnsPinMiddleware {
@ -127,6 +128,10 @@ class DnsPinMiddleware {
$targetIps = $this->dnsResolve($hostName, 0);
if (empty($targetIps)) {
throw new LocalServerException('No DNS record found for ' . $hostName);
}
$curlResolves = [];
foreach ($ports as $port) {

Loading…
Cancel
Save