From 178a558b6db5022938ddb3bb52adf83007ff0b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 24 Sep 2020 11:39:26 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 7ece337..0c9e20b 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -317,6 +317,10 @@ class HttpClient return false; } + if (!empty($this->host)) { + return $string; + } + if ($this->isHttp($string)) { $string = str_replace('http://', '', $string); $hostAndUrls = explode('/', $string); @@ -346,7 +350,6 @@ class HttpClient $this->host = System::gethostbyname($this->host); } - var_dump($this->host,$string); if (!$this->checkIsIp($this->host) && !$this->isDomainName($this->host)) { throw new Exception('Client Host error.'); }