This commit is contained in:
2020-11-18 14:26:58 +08:00
parent 0dcf0514c8
commit a3934a0a44
+6 -6
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->host = $host;
$this->addHeader('Host', $host); // if (!preg_match('/(\d{1,3}\.){4}/', $host . '.')) {
$this->host = System::gethostbyname($host); // $this->addHeader('Host', $host);
} else { // $this->host = System::gethostbyname($host);
$this->host = $host; // } else {
} // }
} }
/** /**