summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDominik Fuchß <develop@fuchss.org>2023-05-15 23:35:12 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-06-14 20:27:38 +0000
commitc64e9f6e93b75bf0c545922bb0ca2e1f43197af6 (patch)
treeb0902b95277437f84326085b0cb9821cb01a4381 /lib
parentf83d31d6e8e8644b760468779fcaaa91c6863b13 (diff)
downloadnextcloud-server-c64e9f6e93b75bf0c545922bb0ca2e1f43197af6.tar.gz
nextcloud-server-c64e9f6e93b75bf0c545922bb0ca2e1f43197af6.zip
Add config variable for curl timeout
Add the config variable for curl calls ("remote_curl_timeout"). E.g., needed for nextcloud federation. Signed-off-by: Dominik Fuchß <develop@fuchss.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/DAV.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index a791db651c3..d17d01879bf 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -373,7 +373,9 @@ class DAV extends Common {
->newClient()
->get($this->createBaseUri() . $this->encodePath($path), [
'auth' => [$this->user, $this->password],
- 'stream' => true
+ 'stream' => true,
+ // set download timeout for users with slow connections or large files
+ 'timeout' => \OC::$server->getConfig()->getSystemValueInt('remote_curl_timeout', 30)
]);
} catch (\GuzzleHttp\Exception\ClientException $e) {
if ($e->getResponse() instanceof ResponseInterface
@@ -530,7 +532,9 @@ class DAV extends Common {
->newClient()
->put($this->createBaseUri() . $this->encodePath($target), [
'body' => $source,
- 'auth' => [$this->user, $this->password]
+ 'auth' => [$this->user, $this->password],
+ // set upload timeout for users with slow connections or large files
+ 'timeout' => \OC::$server->getConfig()->getSystemValueInt('remote_curl_timeout', 30)
]);
$this->removeCachedFile($target);