changeset 36297:a59ff82154b8

httppeer: headers are native strings # skip-blame just marking some native strings Differential Revision: https://phab.mercurial-scm.org/D2313
author Augie Fackler <augie@google.com>
date Sun, 18 Feb 2018 00:03:39 -0500
parents d18c0cf5f3ab
children b1c713ab785d
files mercurial/httppeer.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httppeer.py	Sun Feb 18 00:03:27 2018 -0500
+++ b/mercurial/httppeer.py	Sun Feb 18 00:03:39 2018 -0500
@@ -335,7 +335,7 @@
 
         if data is not None:
             self.ui.debug("sending %d bytes\n" % size)
-            req.add_unredirected_header('Content-Length', '%d' % size)
+            req.add_unredirected_header(r'Content-Length', r'%d' % size)
         try:
             resp = self._openurl(req)
         except urlerr.httperror as inst:
@@ -434,7 +434,7 @@
 
         tempname = bundle2.writebundle(self.ui, cg, None, type)
         fp = httpconnection.httpsendfile(self.ui, tempname, "rb")
-        headers = {'Content-Type': 'application/mercurial-0.1'}
+        headers = {r'Content-Type': r'application/mercurial-0.1'}
 
         try:
             r = self._call(cmd, data=fp, headers=headers, **args)
@@ -465,7 +465,7 @@
             fh.close()
             # start http push
             fp_ = httpconnection.httpsendfile(self.ui, filename, "rb")
-            headers = {'Content-Type': 'application/mercurial-0.1'}
+            headers = {r'Content-Type': r'application/mercurial-0.1'}
             return self._callstream(cmd, data=fp_, headers=headers, **args)
         finally:
             if fp_ is not None: