From dfad7c64fb907dda5fdb053df5078e3bcb41fef2 Mon Sep 17 00:00:00 2001 From: Eric Johnson Date: Tue, 3 Nov 2015 17:38:52 +0000 Subject: [PATCH] Allow PATCH to list of valid HTTP methods --- lib/ansible/module_utils/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index f68f8133cc1..979d5943dde 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -669,7 +669,7 @@ def open_url(url, data=None, headers=None, method=None, use_proxy=True, urllib2.install_opener(opener) if method: - if method.upper() not in ('OPTIONS','GET','HEAD','POST','PUT','DELETE','TRACE','CONNECT'): + if method.upper() not in ('OPTIONS','GET','HEAD','POST','PUT','DELETE','TRACE','CONNECT','PATCH'): raise ConnectionError('invalid HTTP request method; %s' % method.upper()) request = RequestWithMethod(url, method.upper(), data) else: