diff --git a/typo3/sysext/core/Classes/Http/Client/GuzzleClientFactory.php b/typo3/sysext/core/Classes/Http/Client/GuzzleClientFactory.php
index 11073e06f0da53e32909111559f6ef1b41beb0a4..e7b2c8997f82a94cee6395805387a172e38a5aa0 100644
--- a/typo3/sysext/core/Classes/Http/Client/GuzzleClientFactory.php
+++ b/typo3/sysext/core/Classes/Http/Client/GuzzleClientFactory.php
@@ -37,8 +37,8 @@ class GuzzleClientFactory
 
         if (isset($GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler']) && is_array($GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'])) {
             $stack = HandlerStack::create();
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] ?? [] as $handler) {
-                $stack->push($handler);
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] ?? [] as $name => $handler) {
+                $stack->push($handler, (string)$name);
             }
             $httpOptions['handler'] = $stack;
         }