add clear
This commit is contained in:
@@ -247,10 +247,13 @@ class HttpClient
|
|||||||
}
|
}
|
||||||
$explode = explode('/', $url);
|
$explode = explode('/', $url);
|
||||||
$first = array_shift($explode);
|
$first = array_shift($explode);
|
||||||
if (preg_match('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $first)) {
|
|
||||||
if (strpos($first, ':') !== false) {
|
if (strpos($first, ':') !== false) {
|
||||||
[$first, $this->port] = explode(':', $first);
|
[$first, $this->port] = explode(':', $first);
|
||||||
|
if ($this->port !== 443) {
|
||||||
|
$this->isSSL = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (preg_match('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $first)) {
|
||||||
return $first;
|
return $first;
|
||||||
}
|
}
|
||||||
return System::gethostbyname($first);
|
return System::gethostbyname($first);
|
||||||
|
|||||||
Reference in New Issue
Block a user