From b32ae6ff0cb93d423da506112e1db8a331560db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 29 Sep 2021 16:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-handler/Client/ClientAbstracts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-handler/Client/ClientAbstracts.php b/http-handler/Client/ClientAbstracts.php index 5ea6be76..12f20b6f 100644 --- a/http-handler/Client/ClientAbstracts.php +++ b/http-handler/Client/ClientAbstracts.php @@ -617,7 +617,7 @@ abstract class ClientAbstracts extends Component implements IClient $this->port = $isHttps ? 443 : $this->port; if (isIp($domain)) { $this->host = $domain; - } else if ($this->isUseSwoole()) { + } else if (Context::inCoroutine()) { $this->host = System::gethostbyname($domain) ?? $domain; } else { $this->host = $domain; @@ -638,7 +638,7 @@ abstract class ClientAbstracts extends Component implements IClient { $host = $this->getHost(); if ($string == '/') { - $string = ''; + $string = '/'; } else if (!str_starts_with($string, '/')) { $string = '/' . $string; }