Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6b8b4ab

Browse filesBrowse files
bug #44743 [HttpClient] fix checking for recent curl consts (nicolas-grekas)
This PR was merged into the 5.3 branch. Discussion ---------- [HttpClient] fix checking for recent curl consts | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #42061 | License | MIT | Doc PR | - Commits ------- 0d477e9 [HttpClient] fix checking for recent curl consts
2 parents d3eeb83 + 0d477e9 commit 6b8b4ab
Copy full SHA for 6b8b4ab

File tree

1 file changed

+8
-2
lines changed
Filter options

1 file changed

+8
-2
lines changed

‎src/Symfony/Component/HttpClient/CurlHttpClient.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/CurlHttpClient.php
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,6 @@ private function validateExtraCurlOptions(array $options): void
439439
\CURLOPT_INFILESIZE => 'body',
440440
\CURLOPT_POSTFIELDS => 'body',
441441
\CURLOPT_UPLOAD => 'body',
442-
\CURLOPT_PINNEDPUBLICKEY => 'peer_fingerprint',
443-
\CURLOPT_UNIX_SOCKET_PATH => 'bindto',
444442
\CURLOPT_INTERFACE => 'bindto',
445443
\CURLOPT_TIMEOUT_MS => 'max_duration',
446444
\CURLOPT_TIMEOUT => 'max_duration',
@@ -463,6 +461,14 @@ private function validateExtraCurlOptions(array $options): void
463461
\CURLOPT_PROGRESSFUNCTION => 'on_progress',
464462
];
465463

464+
if (\defined('CURLOPT_UNIX_SOCKET_PATH')) {
465+
$curloptsToConfig[\CURLOPT_UNIX_SOCKET_PATH] = 'bindto';
466+
}
467+
468+
if (\defined('CURLOPT_PINNEDPUBLICKEY')) {
469+
$curloptsToConfig[\CURLOPT_PINNEDPUBLICKEY] = 'peer_fingerprint';
470+
}
471+
466472
$curloptsToCheck = [
467473
\CURLOPT_PRIVATE,
468474
\CURLOPT_HEADERFUNCTION,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.