Revert "改名"
This reverts commit fdf58326
This commit is contained in:
+17
-18
@@ -108,26 +108,25 @@ class AsyncClient extends ClientAbstracts
|
|||||||
{
|
{
|
||||||
$array = $this->_parseHeaders($path);
|
$array = $this->_parseHeaders($path);
|
||||||
|
|
||||||
if ($this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content)) {
|
$this->client->send(implode("\r\n", $array) . "\r\n\r\n" . $content);
|
||||||
$receive = '';
|
$receive = '';
|
||||||
while (true) {
|
while (true) {
|
||||||
$tmp = $this->client->recv();
|
$tmp = $this->client->recv();
|
||||||
if (empty($tmp)) {
|
if (empty($tmp)) {
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
$receive .= $tmp;
|
|
||||||
}
|
}
|
||||||
|
$receive .= $tmp;
|
||||||
Kiri::getDi()->get(Logger::class)->debug($receive);
|
|
||||||
[$header, $body] = explode("\r\n\r\n", $receive);
|
|
||||||
|
|
||||||
$header = explode("\r\n", $header);
|
|
||||||
$status = array_shift($header);
|
|
||||||
|
|
||||||
$this->setStatusCode(intval(explode(' ', $status)[1]));
|
|
||||||
$this->parseResponseHeaders($header);
|
|
||||||
$this->setBody($body);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Kiri::getDi()->get(Logger::class)->debug($receive);
|
||||||
|
[$header, $body] = explode("\r\n\r\n", $receive);
|
||||||
|
|
||||||
|
$header = explode("\r\n", $header);
|
||||||
|
$status = array_shift($header);
|
||||||
|
|
||||||
|
$this->setStatusCode(intval(explode(' ', $status)[1]));
|
||||||
|
$this->parseResponseHeaders($header);
|
||||||
|
$this->setBody($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user