diff --git a/sys/lib/python/hgext/hgwebfs.py b/sys/lib/python/hgext/hgwebfs.py index 45abf8cb5..9ae26b959 100644 --- a/sys/lib/python/hgext/hgwebfs.py +++ b/sys/lib/python/hgext/hgwebfs.py @@ -39,10 +39,12 @@ class Webconn: ctl.seek(0) ctl.write('url '+self.url) m = 'User-Agent: mercurial/proto-1.0\r\n'; - for h in req.headers: - m += h+': '+req.headers[h]+'\r\n' ctl.seek(0) ctl.write('headers '+m) + for h in req.headers: + ctl.seek(0) + ctl.write('headers '+h+': '+req.headers[h]+'\r\n') + if req.has_data(): data = req.get_data() post = open(self.dir+'/postbody', 'w', 0);