summary refs log tree commit diff
path: root/synapse/http/client.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-01-25 09:57:01 +0000
committerErik Johnston <erik@matrix.org>2019-01-25 10:07:08 +0000
commit62514bb81bfa631d5aaaee7126f43ee0e6a7f828 (patch)
tree69514e969311bdee344e51a524969c73c0fdb066 /synapse/http/client.py
parentReview comments (diff)
parentMerge pull request #4448 from matrix-org/erikj/get_pdu_versions (diff)
downloadsynapse-62514bb81bfa631d5aaaee7126f43ee0e6a7f828.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/msc_1813
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r--synapse/http/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py
index afcf698b29..47a1f82ff0 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -333,9 +333,10 @@ class SimpleHttpClient(object):
             "POST", uri, headers=Headers(actual_headers), data=query_bytes
         )
 
+        body = yield make_deferred_yieldable(readBody(response))
+
         if 200 <= response.code < 300:
-            body = yield make_deferred_yieldable(treq.json_content(response))
-            defer.returnValue(body)
+            defer.returnValue(json.loads(body))
         else:
             raise HttpResponseException(response.code, response.phrase, body)