Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[HttpClient] pass CURLOPT_INFILESIZE_LARGE only when supported#59695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
92df1e0
toda6c052
CompareThank you@xabbuh. |
c33333b
intosymfony:6.4Uh oh!
There was an error while loading.Please reload this page.
@@ -316,8 +316,8 @@ public function request(string $method, string $url, array $options = []): Respo | |||
} | |||
foreach ($curlopts as $opt => $value) { | |||
if (\CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) { | |||
$opt = 115; // 115 === CURLOPT_INFILESIZE_LARGE, but it's not defined in PHP | |||
if (\PHP_INT_SIZE === 8 && \defined('CURLOPT_INFILESIZE_LARGE') && \CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
But before the assignment also happened when the constant is not defined, right? Now it need to be defined 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The cURL extension doesn't support option it doesn't know:https://github.com/php/php-src/blob/790286ab6c8954193bbbca778749550a51aceb97/ext/curl/interface.c#L2358
following#59654