diff --git a/src/calibre/srv/http_response.py b/src/calibre/srv/http_response.py index af9f8f6c92..f83dc87e82 100644 --- a/src/calibre/srv/http_response.py +++ b/src/calibre/srv/http_response.py @@ -178,7 +178,7 @@ def compress_readable_output(src_file, compress_level=6): prefix_written = True data = gzip_prefix() + data yield data - yield zobj.flush() + struct.pack(b"