##// END OF EJS Templates
httppeer: headers are native strings...
Augie Fackler -
r36311:a59ff821 default
parent child Browse files
Show More
@@ -335,7 +335,7 b' class httppeer(wireproto.wirepeer):'
335
335
336 if data is not None:
336 if data is not None:
337 self.ui.debug("sending %d bytes\n" % size)
337 self.ui.debug("sending %d bytes\n" % size)
338 req.add_unredirected_header('Content-Length', '%d' % size)
338 req.add_unredirected_header(r'Content-Length', r'%d' % size)
339 try:
339 try:
340 resp = self._openurl(req)
340 resp = self._openurl(req)
341 except urlerr.httperror as inst:
341 except urlerr.httperror as inst:
@@ -434,7 +434,7 b' class httppeer(wireproto.wirepeer):'
434
434
435 tempname = bundle2.writebundle(self.ui, cg, None, type)
435 tempname = bundle2.writebundle(self.ui, cg, None, type)
436 fp = httpconnection.httpsendfile(self.ui, tempname, "rb")
436 fp = httpconnection.httpsendfile(self.ui, tempname, "rb")
437 headers = {'Content-Type': 'application/mercurial-0.1'}
437 headers = {r'Content-Type': r'application/mercurial-0.1'}
438
438
439 try:
439 try:
440 r = self._call(cmd, data=fp, headers=headers, **args)
440 r = self._call(cmd, data=fp, headers=headers, **args)
@@ -465,7 +465,7 b' class httppeer(wireproto.wirepeer):'
465 fh.close()
465 fh.close()
466 # start http push
466 # start http push
467 fp_ = httpconnection.httpsendfile(self.ui, filename, "rb")
467 fp_ = httpconnection.httpsendfile(self.ui, filename, "rb")
468 headers = {'Content-Type': 'application/mercurial-0.1'}
468 headers = {r'Content-Type': r'application/mercurial-0.1'}
469 return self._callstream(cmd, data=fp_, headers=headers, **args)
469 return self._callstream(cmd, data=fp_, headers=headers, **args)
470 finally:
470 finally:
471 if fp_ is not None:
471 if fp_ is not None:
General Comments 0
You need to be logged in to leave comments. Login now