]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixing owncloud/core#4301
authorAlexander Bogdanov <syn@li.ru>
Fri, 2 Aug 2013 19:18:29 +0000 (23:18 +0400)
committerAlexander Bogdanov <syn@li.ru>
Fri, 2 Aug 2013 19:18:29 +0000 (23:18 +0400)
Adding a CURLOPT_FOLLOWLOCATION for HTTP 301 support (e.g yandex disk uses those)

apps/files_external/lib/webdav.php

index 4869322d87a9f9fcd78f21b24690ec7a46d3508e..f98be318f1ce61b380459cb1dbb70880bb396a5e 100644 (file)
@@ -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);