mercurial/debugcommands.py
changeset 37047 fddcb51b5084
parent 37045 a708e1e4d7a8
child 37051 40206e227412
--- a/mercurial/debugcommands.py	Tue Mar 13 16:53:21 2018 -0700
+++ b/mercurial/debugcommands.py	Mon Mar 19 16:43:47 2018 -0700
@@ -2970,6 +2970,11 @@
             url = path + httppath
             req = urlmod.urlreq.request(pycompat.strurl(url), body, headers)
 
+            # urllib.Request insists on using has_data() as a proxy for
+            # determining the request method. Override that to use our
+            # explicitly requested method.
+            req.get_method = lambda: method
+
             try:
                 opener.open(req).read()
             except util.urlerr.urlerror as e: