diff options
author | cbhp <cbhp@users.noreply.github.com> | 2014-08-31 19:44:06 +0200 |
---|---|---|
committer | cbhp <cbhp@users.noreply.github.com> | 2014-08-31 19:44:06 +0200 |
commit | 969b41c1c95239796c5eb98a8dac71b5ea367043 (patch) | |
tree | b191150429d5f8b38eeb310b374ba5754e6b345f /lib/private/util.php | |
parent | 6efc7ebef54be6a956e8b6858d8483a2ea5f5c4c (diff) | |
download | nextcloud-server-969b41c1c95239796c5eb98a8dac71b5ea367043.tar.gz nextcloud-server-969b41c1c95239796c5eb98a8dac71b5ea367043.zip |
added missing User-Agents
header "User-Agent" was missed
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-x | lib/private/util.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index adb7fb83d28..1711dd7cf01 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -1303,6 +1303,7 @@ class OC_Util { curl_setopt($rcurl, CURLOPT_NOBODY, true); curl_setopt($rcurl, CURLOPT_FORBID_REUSE, false); curl_setopt($rcurl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($rcurl, CURLOPT_USERAGENT, "ownCloud Server Crawler"); do { curl_setopt($rcurl, CURLOPT_URL, $newURL); $header = curl_exec($rcurl); @@ -1337,6 +1338,7 @@ class OC_Util { if (OC_Config::getValue('proxy', '') != '') { $contextArray = array( 'http' => array( + 'header' => "User-Agent: ownCloud Server Crawler\r\n", 'timeout' => 10, 'proxy' => OC_Config::getValue('proxy') ) @@ -1344,6 +1346,7 @@ class OC_Util { } else { $contextArray = array( 'http' => array( + 'header' => "User-Agent: ownCloud Server Crawler\r\n", 'timeout' => 10 ) ); |