Content-Length: 294042 | pFad | http://github.com/symfony/symfony/pull/59654

DB [HttpClient] Fix uploading files > 2GB by nicolas-grekas · Pull Request #59654 · symfony/symfony · GitHub
Skip to content
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

Open
wants to merge 1 commit into
base: 6.4
Choose a base branch
from

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jan 30, 2025

@@ -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
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/curl/curl/blob/b13e9066b3dfd65ba8aadc336232ae7832ac687a/include/curl/curl.h#L1541

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.

Copy link
Contributor

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 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"A few moments later"
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/symfony/symfony/pull/59654

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy