diff -r 1cfef5693203 -r fddcb51b5084 mercurial/debugcommands.py --- 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: