This commit is contained in:
2020-11-18 14:26:58 +08:00
parent 0dcf0514c8
commit a3934a0a44
+5 -5
View File
@@ -182,12 +182,12 @@ abstract class ClientAbstracts extends Component implements IClient
*/ */
public function setHost(string $host): void public function setHost(string $host): void
{ {
if (!preg_match('/(\d{1,3}\.){4}/', $host . '.')) {
$this->addHeader('Host', $host);
$this->host = System::gethostbyname($host);
} else {
$this->host = $host; $this->host = $host;
} // if (!preg_match('/(\d{1,3}\.){4}/', $host . '.')) {
// $this->addHeader('Host', $host);
// $this->host = System::gethostbyname($host);
// } else {
// }
} }
/** /**