summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2018-07-06 22:18:32 +0200
committerJulien Cristau <jcristau@debian.org>2018-07-06 22:18:32 +0200
commit0f7c3d07152644717ee4542a95ecdeee0ed14c50 (patch)
treebd9d0bcb576f874f1b42d3f2675e43141f151b6d /lib
parentae7734d1068fea76b572e74cb11ce6d42d4740f5 (diff)
Set Content-Length for BinaryResult
Diffstat (limited to 'lib')
-rw-r--r--lib/python/web_support.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/python/web_support.py b/lib/python/web_support.py
index 6f76f5c3c3..da68b7d315 100644
--- a/lib/python/web_support.py
+++ b/lib/python/web_support.py
@@ -674,6 +674,7 @@ class BinaryResult(Result):
self.contents = contents
self.status = status
self.headers['Content-Type'] = mimetype
+ self.headers['Content-Length'] = str(len(self.contents))
def flatten(self, write):
"""Invokes write for the response header and the binary data."""

© 2014-2024 Faster IT GmbH | imprint | privacy policy