-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Since Typo3 version 10 added this feature, now $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] is an array of custom middleware handlers (empty by default), but Guzzle's Client expects $config['handler'] to be an executable HandlerStack.
So passing the $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] as it is to Guzzle in the FastlyProxyProvider, will always hit the InvalidArgumentException.
This doesn't happens with CloudfareProxyProvider by default because of this check, but if you customize the $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] as intended (an array) it wouldn't work either because Guzzle's client expect only a callable value.
So for both providers, I think it should either use the \TYPO3\CMS\Core\Http\RequestFactory to build a handler stack from the $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] (as it says in the feature description), or modify the condition to something like if (isset($httpOptions['handler']) && !is_callable($httpOptions['handler'])) {.