From c5468c95fcb9db5d8819795ac91e204c35b4a3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 24 Sep 2020 11:47:35 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 3bf6cc1..c2e777d 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -171,7 +171,6 @@ 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); @@ -380,10 +379,9 @@ class HttpClient return $this->curl($url, $data); } $url = $this->matchHost(ltrim($url, '/')); - if (!empty($this->port)) { + if (!empty($this->port) && $this->port != 443) { $this->host .= ':' . $this->port; } - var_dump('https://' . $this->host . '/' . $url); if ($this->isSSL) { return $this->curl('https://' . $this->host . '/' . $url, $data); } else {