Adding a CURLOPT_FOLLOWLOCATION for HTTP 301 support (e.g yandex disk uses those)
This commit is contained in:
Alexander Bogdanov 2013-08-02 23:18:29 +04:00
parent 43b31f2161
commit 72ad843203

View 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);