From 044c5c4a28d46a843ae3ffa04134ae5e4efd6e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 11 Jan 2022 15:44:07 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- AsyncClient.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/AsyncClient.php b/AsyncClient.php index 5edffb3..b179c40 100644 --- a/AsyncClient.php +++ b/AsyncClient.php @@ -108,8 +108,15 @@ class AsyncClient extends ClientAbstracts { $array = $this->_parseHeaders($path); - $this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content. "\r\n\r\n"); - $receive = $this->client->recv(); + $this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content . "\r\n\r\n"); + $receive = ''; + while (true) { + $_tmp = $this->client->recv(); + if (empty($_tmp)) { + break; + } + $receive .= $_tmp; + } Kiri::getDi()->get(Logger::class)->debug(implode("\r\n", $array) . "\r\n\r\n" . $content); Kiri::getDi()->get(Logger::class)->debug($receive);