From c5079a63a81a709d8a6f0a299441c1a1c4ffcf00 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Mon, 4 Feb 2013 23:38:10 +0100 Subject: [PATCH] Add Redirect to getUrlContent fix #1065 --- lib/util.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/util.php b/lib/util.php index 363e3f105c..dea1c5ae4a 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'));