Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0507268

Browse files
[HttpClient] fix compat with cURL <= 7.37
1 parent 5b21ce2 commit 0507268

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/HttpClient/CurlHttpClient.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ private function validateExtraCurlOptions(array $options): void
574574
\CURLOPT_HEADER,
575575
\CURLOPT_CONNECTTIMEOUT,
576576
\CURLOPT_CONNECTTIMEOUT_MS,
577-
\CURLOPT_HEADEROPT,
578577
\CURLOPT_HTTP_VERSION,
579578
\CURLOPT_PORT,
580579
\CURLOPT_DNS_USE_GLOBAL_CACHE,
@@ -588,6 +587,10 @@ private function validateExtraCurlOptions(array $options): void
588587
$curloptsToCheck[] = \CURLOPT_HTTP09_ALLOWED;
589588
}
590589

590+
if (\defined('CURLOPT_HEADEROPT')) {
591+
$curloptsToCheck[] = \CURLOPT_HEADEROPT;
592+
}
593+
591594
$methodOpts = [
592595
\CURLOPT_POST,
593596
\CURLOPT_PUT,

0 commit comments

Comments
 (0)