diff mercurial/hgweb/hgweb_mod.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 bebb05a7e249
children e9ea0f0f05e7
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Tue Jan 15 01:05:12 2013 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Tue Jan 15 01:07:03 2013 +0100
@@ -158,8 +158,9 @@
                                  '').lower() != '100-continue') or
                     req.env.get('X-HgHttp2', '')):
                     req.drain()
-                req.respond(inst, protocol.HGTYPE)
-                return '0\n%s\n' % inst.message
+                req.respond(inst, protocol.HGTYPE,
+                            body='0\n%s\n' % inst.message)
+                return ''
 
         # translate user-visible url structure to internal structure