Skip to content
Snippets Groups Projects
Commit 969b41c1 authored by cbhp's avatar cbhp
Browse files

added missing User-Agents

header "User-Agent" was missed
parent 6efc7ebe
No related branches found
No related tags found
No related merge requests found
......@@ -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
)
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment