Skip to content

Commit 04738bc

Browse files
committed
Merge branch '6.4' into 7.2
* 6.4: pass CURLOPT_INFILESIZE_LARGE only when supported
2 parents c633647 + c33333b commit 04738bc

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
@@ -320,8 +320,8 @@ public function request(string $method, string $url, array $options = []): Respo
320320
}
321321

322322
foreach ($curlopts as $opt => $value) {
323-
if (\CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) {
324-
$opt = 115; // 115 === CURLOPT_INFILESIZE_LARGE, but it's not defined in PHP
323+
if (\PHP_INT_SIZE === 8 && \defined('CURLOPT_INFILESIZE_LARGE') && \CURLOPT_INFILESIZE === $opt && $value >= 1 << 31) {
324+
$opt = \CURLOPT_INFILESIZE_LARGE;
325325
}
326326
if (null !== $value && !curl_setopt($ch, $opt, $value) && \CURLOPT_CERTINFO !== $opt && (!\defined('CURLOPT_HEADEROPT') || \CURLOPT_HEADEROPT !== $opt)) {
327327
$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