mercurial/keepalive.py
changeset 30922 1beeb5185930
parent 30688 dc5b594f41e9
child 31999 aa836f56c3cc
--- a/mercurial/keepalive.py	Fri Feb 10 13:56:31 2017 -0800
+++ b/mercurial/keepalive.py	Mon Feb 13 15:12:17 2017 -0500
@@ -310,14 +310,16 @@
         try:
             if req.has_data():
                 data = req.get_data()
-                h.putrequest('POST', req.get_selector(), **skipheaders)
+                h.putrequest(
+                    req.get_method(), req.get_selector(), **skipheaders)
                 if 'content-type' not in headers:
                     h.putheader('Content-type',
                                 'application/x-www-form-urlencoded')
                 if 'content-length' not in headers:
                     h.putheader('Content-length', '%d' % len(data))
             else:
-                h.putrequest('GET', req.get_selector(), **skipheaders)
+                h.putrequest(
+                    req.get_method(), req.get_selector(), **skipheaders)
         except socket.error as err:
             raise urlerr.urlerror(err)
         for k, v in headers.items():