add clear

This commit is contained in:
as2252258@163.com
2020-01-07 12:54:27 +08:00
parent d586e2aee2
commit 48adcda749
+5 -3
View File
@@ -261,9 +261,11 @@ class HttpClient
*/
private function parseHost(&$url)
{
$host = empty($this->host) ? $url : $this->host;
if ($this->checkIsIp($host)) {
return $host;
if (!empty($this->host)) {
$url = $this->host . '/' . ltrim($url, '/');
}
if (strpos($url, 'http') === false) {
$url = 'https://' . $url;
}
$host = $this->cutRequestUrl($url);
if ($this->checkIsIp($host)) {