src/Leevel/Http/FileResponse.php
public function sendContent(): IResponse
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        if (!$this->isSuccessful()) {
            return parent::sendContent();
        }

        $out = fopen('php://output', 'w');
        $file = fopen($this->file->getPathname(), 'r');
        stream_copy_to_stream($file, $out);
        fclose($out);
        fclose($file);

        return $this;
    }
public function sendContent(): IResponse
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        if (!$this->isSuccessful()) {
            return parent::sendContent();
        }

        $out = fopen('php://output', 'w');
        $file = fopen($this->file->getPathname(), 'r');
        stream_copy_to_stream($file, $out);
        fclose($out);
        fclose($file);

        return $this;
    }
{@inheritdoc}