From 6609a175f2a70c0cff8b76ab8c4e88f693ccc8a0 Mon Sep 17 00:00:00 2001 From: Enrico Date: Sat, 3 Apr 2021 19:46:18 +0200 Subject: [PATCH] allow CurlHttpClient on Windows --- src/Symfony/Component/HttpClient/HttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/HttpClient.php b/src/Symfony/Component/HttpClient/HttpClient.php index 1291b38ec7..1828413294 100644 --- a/src/Symfony/Component/HttpClient/HttpClient.php +++ b/src/Symfony/Component/HttpClient/HttpClient.php @@ -30,7 +30,7 @@ final class HttpClient public static function create(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50): HttpClientInterface { if (\extension_loaded('curl')) { - if ('\\' !== \DIRECTORY_SEPARATOR || ini_get('curl.cainfo') || ini_get('openssl.cafile') || ini_get('openssl.capath')) { + if ('\\' !== \DIRECTORY_SEPARATOR || isset($defaultOptions['cafile']) || isset($defaultOptions['capath']) || ini_get('curl.cainfo') || ini_get('openssl.cafile') || ini_get('openssl.capath')) { return new CurlHttpClient($defaultOptions, $maxHostConnections, $maxPendingPushes); }