mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
get_url headers param values parsing (#4245)
This commit is contained in:
parent
7b66bdc1c4
commit
7b547e3e0b
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ def main():
|
||||||
# Parse headers to dict
|
# Parse headers to dict
|
||||||
if module.params['headers']:
|
if module.params['headers']:
|
||||||
try:
|
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:
|
except:
|
||||||
module.fail_json(msg="The header parameter requires a key:value,key:value syntax to be properly parsed.")
|
module.fail_json(msg="The header parameter requires a key:value,key:value syntax to be properly parsed.")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue