Skip to content

Commit bffd80d

Browse files
committed
Merge branch '6.4' into 7.2
* 6.4: pass CURLOPT_INFILESIZE_LARGE only when supported
2 parents d281c96 + d5736d1 commit bffd80d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)