add clear
This commit is contained in:
@@ -317,6 +317,10 @@ class HttpClient
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($this->host)) {
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->isHttp($string)) {
|
if ($this->isHttp($string)) {
|
||||||
$string = str_replace('http://', '', $string);
|
$string = str_replace('http://', '', $string);
|
||||||
$hostAndUrls = explode('/', $string);
|
$hostAndUrls = explode('/', $string);
|
||||||
@@ -346,7 +350,6 @@ class HttpClient
|
|||||||
$this->host = System::gethostbyname($this->host);
|
$this->host = System::gethostbyname($this->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
var_dump($this->host,$string);
|
|
||||||
if (!$this->checkIsIp($this->host) && !$this->isDomainName($this->host)) {
|
if (!$this->checkIsIp($this->host) && !$this->isDomainName($this->host)) {
|
||||||
throw new Exception('Client Host error.');
|
throw new Exception('Client Host error.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user