summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2021-01-12 14:34:21 +0100
committerGitHub <noreply@github.com>2021-01-12 14:34:21 +0100
commite44f275cfedaf1b7934a3ff0d6b8f575a28d9ca6 (patch)
treeb5fd2da318c1ec4f98b000d14038a995bcdc30ce /lib
parent90c0e943dd15239def4b5d35ad7e417afe49e65b (diff)
parent41c80d6c19ee3bb0bb0bec43b3a030df8165430d (diff)
downloadnextcloud-server-e44f275cfedaf1b7934a3ff0d6b8f575a28d9ca6.tar.gz
nextcloud-server-e44f275cfedaf1b7934a3ff0d6b8f575a28d9ca6.zip
Merge pull request #25088 from nextcloud/fix/allow_app_updates_again
Allow installing/updating of apps again
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Http/Client/Client.php18
-rw-r--r--lib/private/Installer.php2
-rw-r--r--lib/public/Http/Client/IClient.php12
3 files changed, 19 insertions, 13 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index 3f616df0b28..12d1efb45a2 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -95,6 +95,12 @@ class Client implements IClient {
$options[RequestOptions::HEADERS]['Accept-Encoding'] = 'gzip';
}
+ // Fallback for save_to
+ if (isset($options['save_to'])) {
+ $options['sink'] = $options['save_to'];
+ unset($options['save_to']);
+ }
+
return $options;
}
@@ -218,7 +224,7 @@ class Client implements IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* 'timeout' => 5,
@@ -249,7 +255,7 @@ class Client implements IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* 'timeout' => 5,
@@ -284,7 +290,7 @@ class Client implements IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* 'timeout' => 5,
@@ -324,7 +330,7 @@ class Client implements IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* 'timeout' => 5,
@@ -359,7 +365,7 @@ class Client implements IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* 'timeout' => 5,
@@ -394,7 +400,7 @@ class Client implements IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* 'timeout' => 5,
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index e0eb8e9de18..6dfc9a5f0bb 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -286,7 +286,7 @@ class Installer {
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
$timeout = $this->isCLI ? 0 : 120;
$client = $this->clientService->newClient();
- $client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => $timeout]);
+ $client->get($app['releases'][0]['download'], ['sink' => $tempFile, 'timeout' => $timeout]);
// Check if the signature actually matches the downloaded content
$certificate = openssl_get_publickey($app['certificate']);
diff --git a/lib/public/Http/Client/IClient.php b/lib/public/Http/Client/IClient.php
index 4c50c1c6497..1498cfaaba2 100644
--- a/lib/public/Http/Client/IClient.php
+++ b/lib/public/Http/Client/IClient.php
@@ -55,7 +55,7 @@ interface IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* @return IResponse
@@ -80,7 +80,7 @@ interface IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* @return IResponse
@@ -110,7 +110,7 @@ interface IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* @return IResponse
@@ -140,7 +140,7 @@ interface IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* @return IResponse
@@ -170,7 +170,7 @@ interface IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* @return IResponse
@@ -200,7 +200,7 @@ interface IClient {
* 'referer' => true, // add a Referer header
* 'protocols' => ['https'] // only allow https URLs
* ],
- * 'save_to' => '/path/to/file', // save to a file or a stream
+ * 'sink' => '/path/to/file', // save to a file or a stream
* 'verify' => true, // bool or string to CA file
* 'debug' => true,
* @return IResponse