add clear
This commit is contained in:
@@ -261,9 +261,11 @@ class HttpClient
|
|||||||
*/
|
*/
|
||||||
private function parseHost(&$url)
|
private function parseHost(&$url)
|
||||||
{
|
{
|
||||||
$host = empty($this->host) ? $url : $this->host;
|
if (!empty($this->host)) {
|
||||||
if ($this->checkIsIp($host)) {
|
$url = $this->host . '/' . ltrim($url, '/');
|
||||||
return $host;
|
}
|
||||||
|
if (strpos($url, 'http') === false) {
|
||||||
|
$url = 'https://' . $url;
|
||||||
}
|
}
|
||||||
$host = $this->cutRequestUrl($url);
|
$host = $this->cutRequestUrl($url);
|
||||||
if ($this->checkIsIp($host)) {
|
if ($this->checkIsIp($host)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user