From: Brice Maron Date: Mon, 4 Feb 2013 22:38:10 +0000 (+0100) Subject: Add Redirect to getUrlContent fix #1065 X-Git-Tag: v5.0.0alpha1~87^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5079a63a81a709d8a6f0a299441c1a1c4ffcf00;p=nextcloud-server.git Add Redirect to getUrlContent fix #1065 --- diff --git a/lib/util.php b/lib/util.php index 363e3f105c0..dea1c5ae4a5 100755 --- a/lib/util.php +++ b/lib/util.php @@ -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'));