diff options
author | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-03-16 17:47:36 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-03-16 17:47:36 +0100 |
commit | 9c71514b7158cfa8102b6a32775b783fcd9681ed (patch) | |
tree | a6d46ceed2365090e8be0d0cbdaf65ad88f02cdc | |
parent | e86a1f3fbee312b50e77408864d73e77b520dbc7 (diff) | |
download | plan9front-9c71514b7158cfa8102b6a32775b783fcd9681ed.tar.xz |
hgwebfs: make push work
-rw-r--r-- | sys/lib/python/hgext/hgwebfs.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/lib/python/hgext/hgwebfs.py b/sys/lib/python/hgext/hgwebfs.py index 459765a57..ff54ff036 100644 --- a/sys/lib/python/hgext/hgwebfs.py +++ b/sys/lib/python/hgext/hgwebfs.py @@ -11,17 +11,14 @@ class Webconn: self.dir = mnt+'/'+ctl.readline().rstrip('\n') ctl.seek(0) ctl.write('url '+self.url) - m = '' + m = 'User-Agent: mercurial/proto-1.0\r\n'; for h in req.headers: m += h+': '+req.headers[h]+'\r\n' - if len(m) > 0: - m = 'headers '+m - print m - ctl.seek(0) - ctl.write(m) + ctl.seek(0) + ctl.write('headers '+m) if req.has_data(): data = req.get_data() - post = open(self.dir+'/postdata', 'w', 0); + post = open(self.dir+'/postbody', 'w', 0); try: while True: buf = data.read(4096) |