Skip to content

[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Feb 4, 2025

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

following #59654

@xabbuh xabbuh force-pushed the pr-59654 branch 2 times, most recently from 92df1e0 to da6c052 Compare February 4, 2025 16:55
@xabbuh xabbuh changed the title [HttpClient] limit using CURLOPT_INFILESIZE_LARGE to 64bit PHP versions [HttpClient] pass CURLOPT_INFILESIZE_LARGE only when supported Feb 4, 2025
@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit c33333b into symfony:6.4 Feb 4, 2025
10 of 11 checks passed
@xabbuh xabbuh deleted the pr-59654 branch February 4, 2025 17:28
@@ -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) {
Copy link
Contributor

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 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

5 participants