add clear
This commit is contained in:
@@ -171,6 +171,7 @@ class HttpClient
|
||||
public function setHost(string $host)
|
||||
{
|
||||
$this->host = $this->replaceHost($host);
|
||||
var_dump($this->host);
|
||||
$match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/';
|
||||
if (preg_match($match_quest, $this->host)) {
|
||||
$this->addHeader('Host', $this->host);
|
||||
@@ -316,11 +317,9 @@ class HttpClient
|
||||
if (empty($string)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($this->host)) {
|
||||
return $string;
|
||||
}
|
||||
var_dump($this->host,$string);
|
||||
if ($this->isHttp($string)) {
|
||||
$string = str_replace('http://', '', $string);
|
||||
$hostAndUrls = explode('/', $string);
|
||||
|
||||
Reference in New Issue
Block a user