From 15a6a4dd98a01761f8522948ae27dac6a939152d Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Tue, 14 Jan 2020 20:58:42 -0800 Subject: [PATCH] Use setRange() --- src/Curl/Curl.php | 2 +- src/Curl/MultiCurl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index aca8ab7..a1bb042 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -309,7 +309,7 @@ class Curl if (is_file($download_filename) && $filesize = filesize($download_filename)) { $first_byte_position = $filesize; $range = $first_byte_position . '-'; - $this->setOpt(CURLOPT_RANGE, $range); + $this->setRange($range); $this->fileHandle = fopen($download_filename, 'ab'); } else { $this->fileHandle = fopen($download_filename, 'wb'); diff --git a/src/Curl/MultiCurl.php b/src/Curl/MultiCurl.php index 813370d..0df861b 100644 --- a/src/Curl/MultiCurl.php +++ b/src/Curl/MultiCurl.php @@ -102,7 +102,7 @@ class MultiCurl if (is_file($download_filename) && $filesize = filesize($download_filename)) { $first_byte_position = $filesize; $range = $first_byte_position . '-'; - $curl->setOpt(CURLOPT_RANGE, $range); + $curl->setRange($range); $curl->fileHandle = fopen($download_filename, 'ab'); // Move the downloaded temporary file to the destination save path.