diff --git a/common/HttpClient.php b/common/HttpClient.php index a5ca7a3..9cb2c19 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -240,6 +240,9 @@ class HttpClient */ private function parseUrlHost(&$url) { + if (!empty($this->host)) { + return $this->host; + } if ($this->isHttp($url)) { $url = str_replace('http://', '', $url); } else if ($this->isHttps($url)) { @@ -252,13 +255,8 @@ class HttpClient if ($this->port !== 443) { $this->isSSL = false; } + $url = '/' . implode('/', $explode); } - - $url = '/' . implode('/', $explode); - if (!empty($this->host)) { - return $this->host; - } - if (preg_match('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $first)) { return $first; }