mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-09 21:45:29 +00:00
Fix #405: Support resume for Curl::download()
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once 'ContentRangeServer.php';
|
||||
require_once 'RangeHeader.php';
|
||||
require_once 'Helper.php';
|
||||
|
||||
use \Helper\Test;
|
||||
@@ -257,6 +260,10 @@ if ($test === 'http_basic_auth') {
|
||||
header('ETag: ' . md5($str));
|
||||
echo $str;
|
||||
exit;
|
||||
} elseif ($test === 'download_file_range') {
|
||||
$unsafe_file_path = $_GET['file_path'];
|
||||
(new ContentRangeServer\ContentRangeServer())->serve($unsafe_file_path);
|
||||
exit;
|
||||
} elseif ($test === 'timeout') {
|
||||
$unsafe_seconds = $_GET['seconds'];
|
||||
$start = time();
|
||||
|
||||
Reference in New Issue
Block a user