X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fsp%2Fxhtml.py;h=5f1ca45eda7608e53a3f592283f474cf4fb2c334;hb=a9a78095b1696f56946abfc7c284f86a21fdcc2d;hp=17c56788729b63cbb631a2a3db547a4dbb441edf;hpb=a7a0908019bb95bb2be1c01e97e88f344807ccec;p=wrw.git diff --git a/wrw/sp/xhtml.py b/wrw/sp/xhtml.py index 17c5678..5f1ca45 100644 --- a/wrw/sp/xhtml.py +++ b/wrw/sp/xhtml.py @@ -53,9 +53,12 @@ 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): return forreq(req, callable(req)) + wrapper.__wrapped__ = callable return wrapper