1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #13021 from erjohnso/urls_patch

Allow PATCH to list of valid HTTP methods
This commit is contained in:
Toshio Kuratomi 2015-11-03 09:52:38 -08:00
commit 127bb1fa77

View file

@ -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: