add clear
This commit is contained in:
@@ -240,6 +240,9 @@ class HttpClient
|
||||
*/
|
||||
private function parseUrlHost(&$url)
|
||||
{
|
||||
if (!empty($this->host)) {
|
||||
return $this->host;
|
||||
}
|
||||
if ($this->isHttp($url)) {
|
||||
$url = str_replace('http://', '', $url);
|
||||
} else if ($this->isHttps($url)) {
|
||||
@@ -252,13 +255,8 @@ class HttpClient
|
||||
if ($this->port !== 443) {
|
||||
$this->isSSL = false;
|
||||
}
|
||||
$url = '/' . implode('/', $explode);
|
||||
}
|
||||
|
||||
$url = '/' . implode('/', $explode);
|
||||
if (!empty($this->host)) {
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
if (preg_match('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $first)) {
|
||||
return $first;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user