add clear

This commit is contained in:
2020-09-24 11:39:26 +08:00
parent 95849babc7
commit 178a558b6d
+4 -1
View File
@@ -317,6 +317,10 @@ class HttpClient
return false;
}
if (!empty($this->host)) {
return $string;
}
if ($this->isHttp($string)) {
$string = str_replace('http://', '', $string);
$hostAndUrls = explode('/', $string);
@@ -346,7 +350,6 @@ class HttpClient
$this->host = System::gethostbyname($this->host);
}
var_dump($this->host,$string);
if (!$this->checkIsIp($this->host) && !$this->isDomainName($this->host)) {
throw new Exception('Client Host error.');
}