diff options
author | Julien Cristau <jcristau@debian.org> | 2018-07-06 22:18:32 +0200 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2018-07-06 22:18:32 +0200 |
commit | 84032abd796b1b6554e211edad6e88dc2cd17687 (patch) | |
tree | a5beb809a62710a07c38db4de2ae176ec3ae67e9 /lib | |
parent | 7d6d49ac9d3b342db2ffe202237f0177b225d6f1 (diff) |
Set Content-Length for BinaryResult
Diffstat (limited to 'lib')
-rw-r--r-- | lib/python/web_support.py | 1 |
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.""" |