add clear

This commit is contained in:
2020-11-13 16:14:23 +08:00
parent 7def314478
commit 48da0a22bf
+1 -1
View File
@@ -195,8 +195,8 @@ class HttpClient
*/ */
public function setHost(string $host) public function setHost(string $host)
{ {
var_dump($host);
$this->host = $this->replaceHost($host); $this->host = $this->replaceHost($host);
var_dump($this->host);
$match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/'; $match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/';
if (preg_match($match_quest, $this->host)) { if (preg_match($match_quest, $this->host)) {
$this->addHeader('Host', $this->host); $this->addHeader('Host', $this->host);