add clear

This commit is contained in:
2020-11-13 16:07:21 +08:00
parent 32faedd793
commit 98723bcd4f
+1
View File
@@ -196,6 +196,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);