diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-01-02 14:51:16 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-01-02 14:51:16 +0100 |
commit | 5679f04cb1a7fb761590b3a6b501044ddeeebc01 (patch) | |
tree | 746d7774b2fef13026855ac3072c890ba86e0b41 /lib/private/Http/Client | |
parent | fc02564ea6ee17f8f9522f11158c5abbceff58a1 (diff) | |
download | nextcloud-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.php | 11 |
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; } |