Skip to content

Commit c33333b

Browse files
minor #59695 [HttpClient] pass CURLOPT_INFILESIZE_LARGE only when supported (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
2 parents 0beb17a + 018a384 commit c33333b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpClient/CurlHttpClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ public function request(string $method, string $url, array $options = []): Respo
316316
}
317317

318318
foreach ($curlopts as $opt => $value) {
319-
if (\CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) {
320-
$opt = 115; // 115 === CURLOPT_INFILESIZE_LARGE, but it's not defined in PHP
319+
if (\PHP_INT_SIZE === 8 && \defined('CURLOPT_INFILESIZE_LARGE') && \CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) {
320+
$opt = \CURLOPT_INFILESIZE_LARGE;
321321
}
322322
if (null !== $value && !curl_setopt($ch, $opt, $value) && \CURLOPT_CERTINFO !== $opt && (!\defined('CURLOPT_HEADEROPT') || \CURLOPT_HEADEROPT !== $opt)) {
323323
$constantName = $this->findConstantName($opt);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy