summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2018-07-06 23:01:30 +0200
committerJulien Cristau <jcristau@debian.org>2018-07-06 23:01:57 +0200
commit4f71a22753311fc2842197f69e5accadfa60e9c3 (patch)
treeae9df360d9a9d272fa85ba19e147e4c32c3cedfe /lib
parent78b980b5da343d734d4a66c6b462139804701866 (diff)
Also set Content-Length for HTMLResult
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 da68b7d315..0f58d450ac 100644
--- a/lib/python/web_support.py
+++ b/lib/python/web_support.py
@@ -661,6 +661,7 @@ class HTMLResult(Result):
buf.write('\n')
self.contents.flatten(buf.write)
buf = buf.getvalue()
+ self.headers['Content-Length'] = str(len(buf))
def later(req):
headers_later(req)
req.wfile.write(buf)

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