Merge branch 'python3' of git.dolda2000.com:/srv/git/r/wrw into python3
[wrw.git] / wrw / sp / xhtml.py
index 662c171..5f1ca45 100644 (file)
@@ -53,7 +53,9 @@ def forreq(req, tree):
     req.ohead["Content-Type"] = "text/html; charset=utf-8"
     buf = io.BytesIO()
     htmlindenter.output(buf, tree, doctype=(doctype, dtd), charset="utf-8")
-    return [buf.getvalue()]
+    ret = buf.getvalue()
+    req.ohead["Content-Length"] = len(ret)
+    return [ret]
 
 def xhtmlresp(callable):
     def wrapper(req):