From bdc4c78947a2ea7f46f22913d3d5c8884e88be54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 8 Jan 2021 12:01:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Client/Client.php | 5 +++-- HttpServer/Client/ClientAbstracts.php | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HttpServer/Client/Client.php b/HttpServer/Client/Client.php index 56b3e1f9..e330857f 100644 --- a/HttpServer/Client/Client.php +++ b/HttpServer/Client/Client.php @@ -81,9 +81,9 @@ class Client extends ClientAbstracts private function generate_client($data, $host, $isHttps, $path): SClient { if ($isHttps || $this->isSSL()) { - $client = new SClient($host, 443, $this->isSSL()); + $client = new SClient($host, 443, true); } else { - $client = new SClient($host, $this->getPort(), $this->isSSL()); + $client = new SClient($host, $this->getPort(), false); } if (strpos($path, '/') !== 0) { @@ -94,6 +94,7 @@ class Client extends ClientAbstracts $this->addHeader('User-Agent', $this->getAgent()); } + var_dump($this->getHeader()); $client->setHeaders($this->getHeader()); $client->setMethod(strtoupper($this->getMethod())); if (strtolower($this->getMethod()) == self::GET && !empty($data)) { diff --git a/HttpServer/Client/ClientAbstracts.php b/HttpServer/Client/ClientAbstracts.php index 083b1f67..30722380 100644 --- a/HttpServer/Client/ClientAbstracts.php +++ b/HttpServer/Client/ClientAbstracts.php @@ -736,7 +736,6 @@ abstract class ClientAbstracts extends Component implements IClient if (strpos($path, '/') !== 0) { $path = '/' . $path; } - var_dump($this->host, $domain, $isHttps, $path); return [$this->host, $isHttps, $path]; }