mercurial/keepalive.py
changeset 30463 bc0def54c17d
parent 29456 e61d384e3be4
child 30473 39d13b8c101d
--- a/mercurial/keepalive.py	Sat Nov 19 10:54:21 2016 -0800
+++ b/mercurial/keepalive.py	Sat Nov 19 17:11:12 2016 -0800
@@ -332,10 +332,9 @@
     def _start_transaction(self, h, req):
         # What follows mostly reimplements HTTPConnection.request()
         # except it adds self.parent.addheaders in the mix.
-        headers = req.headers.copy()
-        if sys.version_info >= (2, 4):
-            headers.update(req.unredirected_hdrs)
-        headers.update(self.parent.addheaders)
+        headers = dict(self.parent.addheaders)
+        headers.update(req.headers)
+        headers.update(req.unredirected_hdrs)
         headers = dict((n.lower(), v) for n, v in headers.items())
         skipheaders = {}
         for n in ('host', 'accept-encoding'):