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 | 0f7c3d07152644717ee4542a95ecdeee0ed14c50 (patch) | |
tree | bd9d0bcb576f874f1b42d3f2675e43141f151b6d /lib | |
parent | ae7734d1068fea76b572e74cb11ce6d42d4740f5 (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.""" |