From: Alexander Bogdanov Date: Fri, 2 Aug 2013 19:18:29 +0000 (+0400) Subject: Fixing owncloud/core#4301 X-Git-Tag: v6.0.0alpha2~323^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=72ad843203f4bb2d0f88c9b85b424198d7fd28a8;p=nextcloud-server.git Fixing owncloud/core#4301 Adding a CURLOPT_FOLLOWLOCATION for HTTP 301 support (e.g yandex disk uses those) --- 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);