From 9278b98addb9102c4c993bf6429acab85ace5f82 Mon Sep 17 00:00:00 2001 From: Jenny Danzmayr Date: Thu, 21 Dec 2023 22:19:54 +0100 Subject: [PATCH] disabled wsgi.file_wrapper because it returns 0 bytes --- src/c3nav/mapdata/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/mapdata/views.py b/src/c3nav/mapdata/views.py index 656d13e5..3037704b 100644 --- a/src/c3nav/mapdata/views.py +++ b/src/c3nav/mapdata/views.py @@ -181,7 +181,7 @@ def get_cache_package(request, filetype): content_type = 'application/' + {'tar': 'x-tar', 'tar.gz': 'gzip', 'tar.xz': 'x-xz', 'tar.zst': 'zstd'}[filetype] response = StreamingHttpResponse(FileWrapper(f), content_type=content_type) - response.file_to_stream = f # This causes django to use the wsgi.file_wrapper if provided by the wsgi server. + #response.file_to_stream = f # This causes django to use the wsgi.file_wrapper if provided by the wsgi server. response['Content-Length'] = size if content_disposition := content_disposition_header(False, filename): response["Content-Disposition"] = content_disposition