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 | 44997474b2785322c15b2da1da69b1a5282cc7ac (patch) | |
tree | a3e11f9c2532cbd1a3096c233fd58bd949e6651c /lib | |
parent | fcb0be15ea5f7a26dd0ffe4a513f46829f075f00 (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.""" |