From e3d53af1855c816dcdad93558e226aaab0ab52df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sun, 5 Apr 2020 23:41:18 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 24398e8..57cb769 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -518,6 +518,9 @@ class HttpClient { var_dump($host, $this->getHostPort(), $url); $client = new SClient($host, $this->getHostPort(), $this->isSSL); + if (strpos($url, '/') !== 0) { + $url = '/' . $url; + } $client->set($this->settings()); if (!empty($this->agent)) { $this->header['User-Agent'] = $this->agent;