改名
This commit is contained in:
@@ -134,7 +134,7 @@ class Stream implements StreamInterface
|
||||
public function write($string): int
|
||||
{
|
||||
$this->body = $string;
|
||||
$this->size = 0;
|
||||
$this->size = strlen($this->body);
|
||||
return $this->size;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ class Stream implements StreamInterface
|
||||
public function append(string $string): int
|
||||
{
|
||||
$this->body .= $string;
|
||||
$this->size = 0;
|
||||
$this->size = strlen($this->body);
|
||||
return $this->size;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class Http extends \Server\Abstracts\Http implements OnClose, OnConnect
|
||||
$responseData = Help::toXml($responseData);
|
||||
}
|
||||
if (is_array($responseData)) {
|
||||
$interface->stream->write(json_encode($responseData, JSON_UNESCAPED_UNICODE));
|
||||
$interface->stream->write(json_encode($responseData));
|
||||
} else {
|
||||
$interface->stream->write((string)$responseData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user