add clear

This commit is contained in:
2020-04-03 17:33:13 +08:00
parent 73c340844b
commit a826961afa
+6 -1
View File
@@ -338,8 +338,14 @@ class HttpClient
private function cutRequestUrl($url) private function cutRequestUrl($url)
{ {
$url = $this->replaceHost($url); $url = $this->replaceHost($url);
var_dump($url);
$explode = explode('/', $url); $explode = explode('/', $url);
$first = array_shift($explode); $first = array_shift($explode);
var_dump($first, $url);
if (strpos($first, ':') !== false) { if (strpos($first, ':') !== false) {
[$first, $this->port] = explode(':', $first); [$first, $this->port] = explode(':', $first);
if ($this->port !== 443) { if ($this->port !== 443) {
@@ -501,7 +507,6 @@ class HttpClient
} else { } else {
$client->post($url, $data); $client->post($url, $data);
} }
var_dump($client, $url);
$client->close(); $client->close();
return $client; return $client;
} }