Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-11 15:27:10 +08:00
parent e19536ce99
commit cbee38ae54
+10 -9
View File
@@ -108,19 +108,20 @@ class AsyncClient extends ClientAbstracts
{ {
$array = $this->_parseHeaders($path); $array = $this->_parseHeaders($path);
$this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content); if ($this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content)) {
$receive = $this->waite(''); $receive = $this->waite('');
Kiri::getDi()->get(Logger::class)->debug($receive); Kiri::getDi()->get(Logger::class)->debug($receive);
[$header, $body] = explode("\r\n\r\n", $receive); [$header, $body] = explode("\r\n\r\n", $receive);
$header = explode("\r\n", $header); $header = explode("\r\n", $header);
$status = array_shift($header); $status = array_shift($header);
$this->setStatusCode(intval(explode(' ', $status)[1])); $this->setStatusCode(intval(explode(' ', $status)[1]));
$this->parseResponseHeaders($header); $this->parseResponseHeaders($header);
$this->setBody($body); $this->setBody($body);
}
} }