]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add Redirect to getUrlContent fix #1065
authorBrice Maron <brice@bmaron.net>
Mon, 4 Feb 2013 22:38:10 +0000 (23:38 +0100)
committerBrice Maron <brice@bmaron.net>
Mon, 4 Feb 2013 22:38:10 +0000 (23:38 +0100)
lib/util.php

index 363e3f105c0423ac8a1aef3f501992b0aac6ab37..dea1c5ae4a58b4b37b7bb676f623913885642a00 100755 (executable)
@@ -639,6 +639,9 @@ class OC_Util {
                        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                        curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
                        curl_setopt($curl, CURLOPT_URL, $url);
+                       curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
+                       curl_setopt($curl, CURLOPT_MAXREDIRS, 10);
+
                        curl_setopt($curl, CURLOPT_USERAGENT, "ownCloud Server Crawler");
                        if(OC_Config::getValue('proxy','')<>'') {
                                curl_setopt($curl, CURLOPT_PROXY, OC_Config::getValue('proxy'));