summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2014-12-16 13:54:23 -0800
committerJames Cammarata <jimi@sngx.net>2015-02-17 14:41:13 -0600
commit2b50d7cf4abb9037de86f7efc40ec7f9b06f76aa (patch)
tree954879502776b261e2bbcfb52bdef04fd802896c
parent76e4ca853512d26599c4dff168cea95baaee0a8e (diff)
downloadansible-modules-core-2b50d7cf4abb9037de86f7efc40ec7f9b06f76aa.tar.gz
Add text/json as a mimetype to try deserializing
Fixes #503
-rw-r--r--network/basics/uri.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/network/basics/uri.py b/network/basics/uri.py
index 95bf5c70..aac724a8 100644
--- a/network/basics/uri.py
+++ b/network/basics/uri.py
@@ -426,7 +426,8 @@ def main():
uresp[ukey] = value
if 'content_type' in uresp:
- if uresp['content_type'].startswith('application/json'):
+ if uresp['content_type'].startswith('application/json') or \
+ uresp['content_type'].startswith('text/json'):
try:
js = json.loads(content)
uresp['json'] = js