mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
get_url headers param values parsing (#4245)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user