This commit is contained in:
2021-09-29 16:06:16 +08:00
parent 3f03bb0e8b
commit b32ae6ff0c
+2 -2
View File
@@ -617,7 +617,7 @@ abstract class ClientAbstracts extends Component implements IClient
$this->port = $isHttps ? 443 : $this->port; $this->port = $isHttps ? 443 : $this->port;
if (isIp($domain)) { if (isIp($domain)) {
$this->host = $domain; $this->host = $domain;
} else if ($this->isUseSwoole()) { } else if (Context::inCoroutine()) {
$this->host = System::gethostbyname($domain) ?? $domain; $this->host = System::gethostbyname($domain) ?? $domain;
} else { } else {
$this->host = $domain; $this->host = $domain;
@@ -638,7 +638,7 @@ abstract class ClientAbstracts extends Component implements IClient
{ {
$host = $this->getHost(); $host = $this->getHost();
if ($string == '/') { if ($string == '/') {
$string = ''; $string = '/';
} else if (!str_starts_with($string, '/')) { } else if (!str_starts_with($string, '/')) {
$string = '/' . $string; $string = '/' . $string;
} }