diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-11-03 18:33:17 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-11-03 18:33:17 +0000 |
commit | a1a73245b967e0e3c24e3adaf05104a5b040c69e (patch) | |
tree | 2124050c157f0bdda8e6bcd59502fb014c687a9d | |
parent | fix copypaste error (diff) | |
download | synapse-a1a73245b967e0e3c24e3adaf05104a5b040c69e.tar.xz |
fix variable ordering thinko in post_urlencoded_get_json
-rw-r--r-- | synapse/handlers/register.py | 2 | ||||
-rw-r--r-- | synapse/http/client.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 044df53d6e..937d5575fa 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -438,7 +438,7 @@ class RegistrationHandler(BaseHandler): shadow_hs_url = self.hs.config.shadow_server.get("hs_url") as_token = self.hs.config.shadow_server.get("as_token") - yield self.http_client.post_urlencoded_get_json( + yield self.http_client.post_json_get_json( "%s%s" % ( shadow_hs_url, "/_matrix/client/r0/register" ), diff --git a/synapse/http/client.py b/synapse/http/client.py index 3d05f83b8c..ab86c64788 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -157,8 +157,9 @@ class SimpleHttpClient(object): data=query_bytes ) + body = yield make_deferred_yieldable(treq.json_content(response)) + if 200 <= response.code < 300: - body = yield make_deferred_yieldable(treq.json_content(response)) defer.returnValue(body) else: raise HttpResponseException(response.code, response.phrase, body) |