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

get_url headers param values parsing (#4245)

This commit is contained in:
Roman 2016-08-10 21:49:58 +00:00 committed by Matt Clay
parent 7b66bdc1c4
commit 7b547e3e0b

View file

@ -290,7 +290,7 @@ def main():
# Parse headers to dict
if module.params['headers']:
try:
headers = dict(item.split(':') for item in module.params['headers'].split(','))
headers = dict(item.split(':', 1) for item in module.params['headers'].split(','))
except:
module.fail_json(msg="The header parameter requires a key:value,key:value syntax to be properly parsed.")
else: