mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-05 14:04:46 +00:00
Simplified Content-Encoding in response in utils/sendfile.py
This commit is contained in:
parent
b655cda791
commit
27eddba955
1 changed files with 1 additions and 4 deletions
|
|
@ -86,9 +86,6 @@ def sendfile(request, filename, attachment=False, attachment_filename=None, mime
|
|||
|
||||
response['Content-length'] = os.path.getsize(filename)
|
||||
response['Content-Type'] = mimetype
|
||||
if not encoding:
|
||||
encoding = guessed_encoding
|
||||
if encoding:
|
||||
response['Content-Encoding'] = encoding
|
||||
response['Content-Encoding'] = encoding or guessed_encoding
|
||||
|
||||
return response
|
||||
|
|
|
|||
Loading…
Reference in a new issue