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