-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HttpClient] Fix uploading files > 2GB #59654
Conversation
@@ -316,6 +316,9 @@ 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 |
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.
Out of curiosity: Can we add this constant in php-src/ext-curl? I checked the code there, but I can only find CURLOPT_INFILESIZE
, so it may mainly be a copy paste. The problem is, that I did not find the definition for CURLOPT_INIFILESIZE
to be 14 to be able to add 115 for the new constant 🤔 Any hints?
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.
php-src could add the const for sure, but that won't solve the issue for us since this would be for PHP 8.5 earlier.
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 that won't solve the issue for us since this would be for PHP 8.5 earlier.
that's cristal clear, I know 👍
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.
…ported (xabbuh) This PR was merged into the 6.4 branch. Discussion ---------- [HttpClient] pass CURLOPT_INFILESIZE_LARGE only when supported | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT following #59654 Commits ------- 018a384 pass CURLOPT_INFILESIZE_LARGE only when supported
See: