aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2013-02-04 23:38:10 +0100
committerBrice Maron <brice@bmaron.net>2013-02-04 23:38:10 +0100
commitc5079a63a81a709d8a6f0a299441c1a1c4ffcf00 (patch)
tree8451d3ea47282b55039b5506d6d324a9a093789a
parent6e5f211ad1e1967752a427048ff165c9d0ed78db (diff)
downloadnextcloud-server-c5079a63a81a709d8a6f0a299441c1a1c4ffcf00.tar.gz
nextcloud-server-c5079a63a81a709d8a6f0a299441c1a1c4ffcf00.zip
Add Redirect to getUrlContent fix #1065
-rwxr-xr-xlib/util.php3
1 files changed, 3 insertions, 0 deletions
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'));