summaryrefslogtreecommitdiffstats
path: root/lib/private/Http/Client
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-01-02 14:51:16 +0100
committerLukas Reschke <lukas@statuscode.ch>2017-01-02 14:51:16 +0100
commit5679f04cb1a7fb761590b3a6b501044ddeeebc01 (patch)
tree746d7774b2fef13026855ac3072c890ba86e0b41 /lib/private/Http/Client
parentfc02564ea6ee17f8f9522f11158c5abbceff58a1 (diff)
downloadnextcloud-server-5679f04cb1a7fb761590b3a6b501044ddeeebc01.tar.gz
nextcloud-server-5679f04cb1a7fb761590b3a6b501044ddeeebc01.zip
Rebrand to "Nextcloud" and add 100% coverage
Noticed while debugging https://github.com/nextcloud/server/issues/2910 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Http/Client')
-rw-r--r--lib/private/Http/Client/Client.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index 8e182111303..4697f2e038c 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -77,9 +77,10 @@ class Client implements IClient {
}
}
- $this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler');
- if ($this->getProxyUri() !== '') {
- $this->client->setDefaultOption('proxy', $this->getProxyUri());
+ $this->client->setDefaultOption('headers/User-Agent', 'Nextcloud Server Crawler');
+ $proxyUri = $this->getProxyUri();
+ if ($proxyUri !== '') {
+ $this->client->setDefaultOption('proxy', $proxyUri);
}
}
@@ -93,10 +94,10 @@ class Client implements IClient {
$proxyUserPwd = $this->config->getSystemValue('proxyuserpwd', null);
$proxyUri = '';
- if (!is_null($proxyUserPwd)) {
+ if ($proxyUserPwd !== null) {
$proxyUri .= $proxyUserPwd . '@';
}
- if (!is_null($proxyHost)) {
+ if ($proxyHost !== null) {
$proxyUri .= $proxyHost;
}