From: Vincent Vanwaelscappel Date: Fri, 27 Feb 2026 14:48:51 +0000 (+0100) Subject: wip #7868 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d185d33ff4281a83a7e3c661887fd13f44930579;p=cubist_net.git wip #7868 @1 --- diff --git a/src/HTTP.php b/src/HTTP.php index e929d50..59a0d4e 100644 --- a/src/HTTP.php +++ b/src/HTTP.php @@ -66,7 +66,8 @@ class HTTP public static function handleException(\Throwable $e): int { $map = ['GuzzleHttp\Exception\ConnectException' => 622, - 'GuzzleHttp\Psr7\Exception\MalformedUriException' => 600]; + 'GuzzleHttp\Psr7\Exception\MalformedUriException' => 600, + 'GuzzleHttp\Exception\TooManyRedirectsException' => 601]; $messageMap = ['Undefined array key "solution"' => 603]; $startMap = [ 'cURL error 60: SSL: no alternative certificate subject name matches target host name' => 695, @@ -114,7 +115,7 @@ class HTTP 'Dnt' => '1', ]; } - $options = ['timeout' => $timeout, 'http_errors' => false, 'headers' => $headers, 'allow_redirects' => ['track_redirects' => true]] + $options; + $options = ['timeout' => $timeout, 'http_errors' => false, 'headers' => $headers, 'allow_redirects' => ['max' => 10, 'track_redirects' => true]] + $options; if (self::$_cookiesJar) { $options["cookies"] = self::$_cookiesJar; }