diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index db0755a..b4a996b 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -256,11 +256,8 @@ class HttpClient */ private function parseUrlHost(&$url) { - if (!empty($this->host)) { - $url = $this->host . '/' . ltrim($url, '/'); - } - if (strpos($url, 'http') === false) { - $url = 'https://' . $url; + if (!$this->isHttps($url) && !$this->isHttp($url)) { + $url = $this->host . '/' . $url; } $host = $this->cutRequestUrl($url); if ($this->checkIsIp($host)) {