From d185d33ff4281a83a7e3c661887fd13f44930579 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 27 Feb 2026 15:48:51 +0100 Subject: [PATCH] wip #7868 @1 --- src/HTTP.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.5