diff options
author | Brice Maron <brice@bmaron.net> | 2013-02-04 23:38:10 +0100 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2013-02-04 23:38:10 +0100 |
commit | c5079a63a81a709d8a6f0a299441c1a1c4ffcf00 (patch) | |
tree | 8451d3ea47282b55039b5506d6d324a9a093789a | |
parent | 6e5f211ad1e1967752a427048ff165c9d0ed78db (diff) | |
download | nextcloud-server-c5079a63a81a709d8a6f0a299441c1a1c4ffcf00.tar.gz nextcloud-server-c5079a63a81a709d8a6f0a299441c1a1c4ffcf00.zip |
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 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')); |