disabled wsgi.file_wrapper because it returns 0 bytes
This commit is contained in:
parent
5aa14ea93c
commit
9278b98add
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue