summary refs log tree commit diff
path: root/synapse/http/client.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-02 14:37:30 +0100
committerMark Haines <mark.haines@matrix.org>2014-10-02 14:37:30 +0100
commitb9cdc443d7acdd1f8095878e3c24b859f82ea31e (patch)
tree5c0c6d645a190df9dee65679e1295fe06b325190 /synapse/http/client.py
parentAdd a keyword argument to get_json to avoid retrying on DNS failures. Rather ... (diff)
downloadsynapse-b9cdc443d7acdd1f8095878e3c24b859f82ea31e.tar.xz
Fix pyflakes errors
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r--synapse/http/client.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py
index 57b49355f2..5c2fbd1f87 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -236,9 +236,6 @@ class IdentityServerHttpClient(BaseHttpClient):
 
     @defer.inlineCallbacks
     def post_urlencoded_get_json(self, destination, path, args={}):
-        if destination in _destination_mappings:
-            destination = _destination_mappings[destination]
-
         logger.debug("post_urlencoded_get_json args: %s", args)
         query_bytes = urllib.urlencode(args, True)
 
@@ -246,7 +243,7 @@ class IdentityServerHttpClient(BaseHttpClient):
             destination.encode("ascii"),
             "POST",
             path.encode("ascii"),
-            producer=FileBodyProducer(StringIO(urllib.urlencode(args))),
+            producer=FileBodyProducer(StringIO(query_bytes)),
             headers_dict={
                 "Content-Type": ["application/x-www-form-urlencoded"]
             }
@@ -266,16 +263,13 @@ class CaptchaServerHttpClient(MatrixHttpClient):
     @defer.inlineCallbacks
     def post_urlencoded_get_raw(self, destination, path, accept_partial=False,
                                 args={}):
-        if destination in _destination_mappings:
-            destination = _destination_mappings[destination]
-
         query_bytes = urllib.urlencode(args, True)
 
         response = yield self._create_request(
             destination.encode("ascii"),
             "POST",
             path.encode("ascii"),
-            producer=FileBodyProducer(StringIO(urllib.urlencode(args))),
+            producer=FileBodyProducer(StringIO(query_bytes)),
             headers_dict={
                 "Content-Type": ["application/x-www-form-urlencoded"]
             }