8000 bug #40702 [HttpClient] allow CurlHttpClient on Windows (n0rbyt3) · symfony/symfony@3b1948f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b1948f

Browse files
committed
bug #40702 [HttpClient] allow CurlHttpClient on Windows (n0rbyt3)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] allow CurlHttpClient on Windows | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #40676 | License | MIT | Doc PR | no Even if you don't set curl options or openssl cert options on Windows in ```php.ini```, you should be able to use ```CurlHttpClient``` if ```cafile``` or ```capath``` options are set as default options as they will override the options in ```php.ini```. Commits ------- 6609a17 allow CurlHttpClient on Windows
2 parents 2a3f912 + 6609a17 commit 3b1948f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpClient/HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class HttpClient
3030
public static function create(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50): HttpClientInterface
3131
{
3232
if (\extension_loaded('curl')) {
33-
if ('\\' !== \DIRECTORY_SEPARATOR || ini_get('curl.cainfo') || ini_get('openssl.cafile') || ini_get('openssl.capath')) {
33+
if ('\\' !== \DIRECTORY_SEPARATOR || isset($defaultOptions['cafile']) || isset($defaultOptions['capath']) || ini_get('curl.cainfo') || ini_get('openssl.cafile') || ini_get('openssl.capath')) {
3434
return new CurlHttpClient($defaultOptions, $maxHostConnections, $maxPendingPushes);
3535
}
3636

0 commit comments

Comments
 (0)
0