mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
a18f811b2d
commit
97eededc99
1 changed files with 4 additions and 1 deletions
|
@ -297,7 +297,10 @@ def uri(module, url, dest, user, password, body, method, headers, redirects, soc
|
|||
r['redirected'] = redirected
|
||||
r.update(resp_redir)
|
||||
r.update(resp)
|
||||
return r, content, dest
|
||||
try:
|
||||
return r, unicode(content).encode('utf8'), dest
|
||||
except:
|
||||
return r, content, dest
|
||||
except httplib2.RedirectMissingLocation:
|
||||
module.fail_json(msg="A 3xx redirect response code was provided but no Location: header was provided to point to the new location.")
|
||||
except httplib2.RedirectLimit:
|
||||
|
|
Loading…
Reference in a new issue