|
@@ -373,7 +373,7 @@ discard block |
|
|
block discarded – undo |
|
373
|
373
|
// Prepare cURL options: force HTTP/1.1 |
|
374
|
374
|
$curlOpts = [ |
|
375
|
375
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, |
|
376
|
|
- CURLOPT_BUFFERSIZE => 128*1024, // 128 KB chunks instead of default 16 KB |
|
|
376
|
+ CURLOPT_BUFFERSIZE => 128 * 1024, // 128 KB chunks instead of default 16 KB |
|
377
|
377
|
// Increase timeouts for large files |
|
378
|
378
|
CURLOPT_CONNECTTIMEOUT => 60, |
|
379
|
379
|
CURLOPT_TIMEOUT => 300, |
|
@@ -389,10 +389,10 @@ discard block |
|
|
block discarded – undo |
|
389
|
389
|
foreach ($options as $i => $option) { |
|
390
|
390
|
if (strpos($option, '--http1.1') === 0) { |
|
391
|
391
|
$curlOpts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; |
|
392
|
|
- } elseif (strpos($option, '--connect-timeout') === 0 && isset($options[$i+1]) && is_numeric($options[$i+1])) { |
|
393
|
|
- $curlOpts[CURLOPT_CONNECTTIMEOUT] = (int) $options[$i+1]; |
|
394
|
|
- } elseif (strpos($option, '--max-time') === 0 && isset($options[$i+1]) && is_numeric($options[$i+1])) { |
|
395
|
|
- $curlOpts[CURLOPT_TIMEOUT] = (int) $options[$i+1]; |
|
|
392
|
+ } elseif (strpos($option, '--connect-timeout') === 0 && isset($options[$i + 1]) && is_numeric($options[$i + 1])) { |
|
|
393
|
+ $curlOpts[CURLOPT_CONNECTTIMEOUT] = (int) $options[$i + 1]; |
|
|
394
|
+ } elseif (strpos($option, '--max-time') === 0 && isset($options[$i + 1]) && is_numeric($options[$i + 1])) { |
|
|
395
|
+ $curlOpts[CURLOPT_TIMEOUT] = (int) $options[$i + 1]; |
|
396
|
396
|
} |
|
397
|
397
|
} |
|
398
|
398
|
} |
Please login to merge, or discard this patch.