summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-07-08 07:14:56 -0400
committerGitHub <noreply@github.com>2020-07-08 07:14:56 -0400
commitff0680f69d4490d3b0884d97261f5b4f9c1ece1d (patch)
treef949857d980e9eaaffa4589c31a6a37dc10cf815 /synapse/http
parentUpdate the installation docs on apt-transport-https (#7801) (diff)
downloadsynapse-ff0680f69d4490d3b0884d97261f5b4f9c1ece1d.tar.xz
Stop passing bytes when dumping JSON (#7799)
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/matrixfederationclient.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 18f6a8fd29..58aed5fd96 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -562,13 +562,17 @@ class MatrixFederationHttpClient(object):
         Returns:
             list[bytes]: a list of headers to be added as "Authorization:" headers
         """
-        request = {"method": method, "uri": url_bytes, "origin": self.server_name}
+        request = {
+            "method": method.decode("ascii"),
+            "uri": url_bytes.decode("ascii"),
+            "origin": self.server_name,
+        }
 
         if destination is not None:
-            request["destination"] = destination
+            request["destination"] = destination.decode("ascii")
 
         if destination_is is not None:
-            request["destination_is"] = destination_is
+            request["destination_is"] = destination_is.decode("ascii")
 
         if content is not None:
             request["content"] = content