aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-10-07 13:51:45 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-10-07 13:51:45 +0200
commit4058ff3ff4631bcc2c9cba534162c80db5cf2b65 (patch)
tree54b22178f371883779cb6fc59567e0bc7cf55870 /lib
parent9bbec9a1e8035555bec014bc26f7ef178daaf725 (diff)
Remove SimplePie name from HTTP User-Agent string
https://github.com/FreshRSS/FreshRSS/issues/1622#issuecomment-334928486 https://github.com/FreshRSS/FreshRSS/issues/1627 https://github.com/FreshRSS/FreshRSS/issues/1607
Diffstat (limited to 'lib')
-rw-r--r--lib/favicons.php2
-rw-r--r--lib/lib_rss.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/favicons.php b/lib/favicons.php
index a7ed966a1..80246ee74 100644
--- a/lib/favicons.php
+++ b/lib/favicons.php
@@ -35,7 +35,7 @@ function downloadHttp(&$url, $curlOptions = array()) {
CURLOPT_MAXREDIRS => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
- CURLOPT_USERAGENT => 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')',
+ CURLOPT_USERAGENT => FRESHRSS_USERAGENT,
));
if (defined('CURLOPT_ENCODING')) {
curl_setopt($ch, CURLOPT_ENCODING, ''); //Enable all encodings
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 09048700d..7381ff2bd 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -174,7 +174,7 @@ function customSimplePie() {
$system_conf = Minz_Configuration::get('system');
$limits = $system_conf->limits;
$simplePie = new SimplePie();
- $simplePie->set_useragent('FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ') ' . SIMPLEPIE_NAME . '/' . SIMPLEPIE_VERSION);
+ $simplePie->set_useragent(FRESHRSS_USERAGENT);
$simplePie->set_syslog($system_conf->simplepie_syslog_enabled);
$simplePie->set_cache_location(CACHE_PATH);
$simplePie->set_cache_duration($limits['cache_duration']);