diff --git a/src/Http/Server.php b/src/Http/Server.php index d45c5db..d451493 100644 --- a/src/Http/Server.php +++ b/src/Http/Server.php @@ -13,6 +13,7 @@ use React\Http\HttpServer; use React\Http\Message\Response; use React\Socket\SocketServer; +use Symfony\Component\HttpFoundation\BinaryFileResponse; use Throwable; class Server @@ -141,7 +142,7 @@ public function getServer() return new Response( $response->getStatusCode(), $response->headers->allPreserveCase(), - $response->getContent() ?: $response->getFile()?->getContent() ?: '' + $response->getContent() ?: ($response instanceof BinaryFileResponse ? $response->getFile()->getContent() : false) ?: '' ); }); }