qqq
This commit is contained in:
@@ -331,10 +331,6 @@ abstract class ClientAbstracts implements IClient
|
|||||||
protected function withHost(string $host): static
|
protected function withHost(string $host): static
|
||||||
{
|
{
|
||||||
$this->host = $host;
|
$this->host = $host;
|
||||||
if (Context::inCoroutine() && !preg_match('/(\d{1,3}\.){3}\d{1,3}/', $host)) {
|
|
||||||
$this->host = System::gethostbyname($host);
|
|
||||||
$this->withAddedHeader('Host', $host);
|
|
||||||
}
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -37,8 +37,7 @@ class CoroutineClient extends ClientAbstracts
|
|||||||
}
|
}
|
||||||
$host = $this->getHost();
|
$host = $this->getHost();
|
||||||
if (!preg_match('/(\d{1,3}\.){3}\d{1,3}/', $host)) {
|
if (!preg_match('/(\d{1,3}\.){3}\d{1,3}/', $host)) {
|
||||||
$this->withHost(System::gethostbyname($host));
|
$this->withHost(System::gethostbyname($host))->withAddedHeader('Host', $host);
|
||||||
$this->withAddedHeader('Host', $host);
|
|
||||||
}
|
}
|
||||||
$this->withMethod($method)
|
$this->withMethod($method)
|
||||||
->coroutine(
|
->coroutine(
|
||||||
|
|||||||
Reference in New Issue
Block a user