summaryrefslogtreecommitdiffstats
path: root/lib/private/Http/Client/Client.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Http/Client/Client.php')
-rw-r--r--lib/private/Http/Client/Client.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php
index baa358f2fea..ad51feca0be 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -96,21 +96,18 @@ class Client implements IClient {
*/
private function getProxyUri(): ?string {
$proxyHost = $this->config->getSystemValue('proxy', null);
- $proxyUserPwd = $this->config->getSystemValue('proxyuserpwd', null);
- if ($proxyHost === null && $proxyUserPwd === null) {
+ if ($proxyHost === null) {
return null;
}
- $proxyUri = '';
- if ($proxyUserPwd !== null) {
- $proxyUri .= $proxyUserPwd . '@';
- }
- if ($proxyHost !== null) {
- $proxyUri .= $proxyHost;
+ $proxyUserPwd = $this->config->getSystemValue('proxyuserpwd', null);
+
+ if ($proxyUserPwd === null) {
+ return $proxyHost;
}
- return $proxyUri;
+ return $proxyUserPwd . '@' . $proxyHost;
}
/**