diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-07 06:27:58 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-07 06:27:58 -0800 |
commit | 0efcf33e2f349ad7b2be183ee5363db784d2cc5f (patch) | |
tree | 3c7d6bb27e75dcdc0fa8c53429e61f68114f66f3 | |
parent | 6299704dfd0b52ee0456cf905efb2aa004dd3041 (diff) | |
parent | c5079a63a81a709d8a6f0a299441c1a1c4ffcf00 (diff) | |
download | nextcloud-server-0efcf33e2f349ad7b2be183ee5363db784d2cc5f.tar.gz nextcloud-server-0efcf33e2f349ad7b2be183ee5363db784d2cc5f.zip |
Merge pull request #1451 from eMerzh/fix_1065
Add Redirect to getUrlContent fix #1065
-rwxr-xr-x | lib/util.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index faa1a549e64..9ce974619bc 100755 --- a/lib/util.php +++ b/lib/util.php @@ -654,6 +654,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')); |