From b5a8102b72b2ca05a92fdbc4ab7b7801b6f2358f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 24 Sep 2020 11:43:22 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 4ad16af..3bf6cc1 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -171,6 +171,7 @@ class HttpClient public function setHost(string $host) { $this->host = $this->replaceHost($host); + var_dump($this->host); $match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/'; if (preg_match($match_quest, $this->host)) { $this->addHeader('Host', $this->host); @@ -316,11 +317,9 @@ class HttpClient if (empty($string)) { return false; } - if (!empty($this->host)) { return $string; } -var_dump($this->host,$string); if ($this->isHttp($string)) { $string = str_replace('http://', '', $string); $hostAndUrls = explode('/', $string);