改名
This commit is contained in:
@@ -25,17 +25,12 @@ class ResponseEmitter
|
|||||||
*/
|
*/
|
||||||
public function sender(\Swoole\Http\Response|\Swoole\Http2\Response $response, ResponseInterface $emitter)
|
public function sender(\Swoole\Http\Response|\Swoole\Http2\Response $response, ResponseInterface $emitter)
|
||||||
{
|
{
|
||||||
$response->header('Content-Type', $emitter->getResponseFormat());
|
|
||||||
$response->end('$content->getData()');
|
|
||||||
return;
|
|
||||||
$content = $emitter->configure($response)->getContent();
|
$content = $emitter->configure($response)->getContent();
|
||||||
if ($content instanceof FileFormatter) {
|
if ($content instanceof FileFormatter) {
|
||||||
$this->download($content->getData(), $response);
|
$this->download($content->getData(), $response);
|
||||||
} else {
|
} else {
|
||||||
$response->header('Content-Type', $emitter->getResponseFormat());
|
$response->header('Content-Type', $emitter->getResponseFormat());
|
||||||
$response->end($content->getData());
|
$response->end($content->getData());
|
||||||
|
|
||||||
var_dump($response->isWritable());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user