protected function _sendFile($file, $range)
    {
        deprecationWarning('Will be removed in 4.0.0');

        ob_implicit_flush(true);

        $file->open('rb');

        $end = $start = false;
        if ($range) {
            list($start, $end) = $range;
        }
        if ($start !== false) {
            $file->offset($start);
        }

        $bufferSize = 8192;
        if (strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
            set_time_limit(0);
        }
        session_write_close();
        while (!feof($file->handle)) {
            if (!$this->_isActive()) {
                $file->close();

                return false;
            }
            $offset = $file->offset();
            if ($end && $offset >= $end) {
                break;
            }
            if ($end && $offset + $bufferSize >= $end) {
                $bufferSize = $end - $offset + 1;
            }
            echo fread($file->handle, $bufferSize);
        }
        $file->close();

        return true;
    }