summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Bogdanov <syn@li.ru>2013-08-02 23:18:29 +0400
committerAlexander Bogdanov <syn@li.ru>2013-08-02 23:18:29 +0400
commit72ad843203f4bb2d0f88c9b85b424198d7fd28a8 (patch)
tree0ec5300ddecd97eec51a1df7a31d3071a8a1c006
parent43b31f2161775c7db62b46b8e4044f328f774aae (diff)
downloadnextcloud-server-72ad843203f4bb2d0f88c9b85b424198d7fd28a8.tar.gz
nextcloud-server-72ad843203f4bb2d0f88c9b85b424198d7fd28a8.zip
Fixing owncloud/core#4301
Adding a CURLOPT_FOLLOWLOCATION for HTTP 301 support (e.g yandex disk uses those)
-rw-r--r--apps/files_external/lib/webdav.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 4869322d87a..f98be318f1c 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -173,6 +173,7 @@ class DAV extends \OC\Files\Storage\Common{
curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password);
curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$path);
curl_setopt($curl, CURLOPT_FILE, $fp);
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_exec ($curl);
curl_close ($curl);