From e586437334c35f4b556a4e2230413597272f2dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 27 May 2020 16:00:09 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index b6cfa6f..c0b1290 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -171,7 +171,7 @@ class HttpClient public function setHost(string $host) { $this->host = $this->replaceHost($host); - $match_quest = '/^[a-zA-Z\-](\.[a-zA-Z\-])*/'; + $match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/'; if (preg_match($match_quest, $this->host)) { $this->addHeader('Host', $this->host); }