diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-23 21:01:26 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-23 21:01:26 +0200 |
commit | adcf942901fd567d97dbe105e8f3dfb7cea738e3 (patch) | |
tree | 3f3721d872941383689ba8ff661960d521af69c4 /apps/files | |
parent | 5a8af2f0be87cada2827ee3b86d2900146a62f77 (diff) | |
parent | 6577bbe887840889e16634b9bf1c4ce247ec265e (diff) | |
download | nextcloud-server-adcf942901fd567d97dbe105e8f3dfb7cea738e3.tar.gz nextcloud-server-adcf942901fd567d97dbe105e8f3dfb7cea738e3.zip |
Merge pull request #24750 from owncloud/lenz1111-share_download_range_requests_support
Http Range requests support in downloads
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/download.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php index 28ce4c6542e..aedd86b6419 100644 --- a/apps/files/ajax/download.php +++ b/apps/files/ajax/download.php @@ -50,4 +50,13 @@ if(isset($_GET['downloadStartSecret']) setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/'); } -OC_Files::get($dir, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD'); +$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() == 'HEAD' ); + +/** + * Http range requests support + */ +if (isset($_SERVER['HTTP_RANGE'])) { + $server_params['range'] = \OC::$server->getRequest()->getHeader('Range'); +} + +OC_Files::get($dir, $files_list, $server_params); |