diff --git a/index.php b/index.php index edc934be..dde1c943 100644 --- a/index.php +++ b/index.php @@ -519,8 +519,6 @@ private function getUpdateServerResponse(): array { CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $updateURL, CURLOPT_USERAGENT => 'Nextcloud Updater', - CURLOPT_FOLLOWLOCATION => 1, - CURLOPT_MAXREDIRS => 2, ]); if ($this->getConfigOption('proxy') !== null) { @@ -581,6 +579,8 @@ public function downloadUpdate(): void { curl_setopt_array($ch, [ CURLOPT_FILE => $fp, CURLOPT_USERAGENT => 'Nextcloud Updater', + CURLOPT_FOLLOWLOCATION => 1, + CURLOPT_MAXREDIRS => 2, ]); if ($this->getConfigOption('proxy') !== null) { diff --git a/lib/Updater.php b/lib/Updater.php index ee2beff9..1320e874 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -481,8 +481,6 @@ private function getUpdateServerResponse(): array { CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $updateURL, CURLOPT_USERAGENT => 'Nextcloud Updater', - CURLOPT_FOLLOWLOCATION => 1, - CURLOPT_MAXREDIRS => 2, ]); if ($this->getConfigOption('proxy') !== null) { @@ -543,6 +541,8 @@ public function downloadUpdate(): void { curl_setopt_array($ch, [ CURLOPT_FILE => $fp, CURLOPT_USERAGENT => 'Nextcloud Updater', + CURLOPT_FOLLOWLOCATION => 1, + CURLOPT_MAXREDIRS => 2, ]); if ($this->getConfigOption('proxy') !== null) { diff --git a/updater.phar b/updater.phar index 0f73cfc8..357087da 100755 Binary files a/updater.phar and b/updater.phar differ