diff mercurial/hgweb/webcommands.py @ 18352:e33b9b92a200

hgweb: pass the actual response body to request.response, not just the length This makes it less likely to send a response that doesn't match Content-Length.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 01:07:03 +0100
parents 764a758780b6
children bfba6d954108
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Tue Jan 15 01:05:12 2013 +0100
+++ b/mercurial/hgweb/webcommands.py	Tue Jan 15 01:07:03 2013 +0100
@@ -61,8 +61,8 @@
     if mt.startswith('text/'):
         mt += '; charset="%s"' % encoding.encoding
 
-    req.respond(HTTP_OK, mt, path, len(text))
-    return [text]
+    req.respond(HTTP_OK, mt, path, body=text)
+    return []
 
 def _filerevision(web, tmpl, fctx):
     f = fctx.path()