]> _ Git - cubist_net.git/commitdiff
wip #7868 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Feb 2026 14:48:51 +0000 (15:48 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Feb 2026 14:48:51 +0000 (15:48 +0100)
src/HTTP.php

index e929d509816b79e7729a860fef8bfcc5d5094ac9..59a0d4e2a960ef41484682b78961921ee4a9d2d3 100644 (file)
@@ -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;
         }