From 72ad843203f4bb2d0f88c9b85b424198d7fd28a8 Mon Sep 17 00:00:00 2001 From: Alexander Bogdanov Date: Fri, 2 Aug 2013 23:18:29 +0400 Subject: [PATCH] Fixing owncloud/core#4301 Adding a CURLOPT_FOLLOWLOCATION for HTTP 301 support (e.g yandex disk uses those) --- apps/files_external/lib/webdav.php | 1 + 1 file changed, 1 insertion(+) 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); -- 2.39.5