mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:46:04 -04:00
Stop passing bytes when dumping JSON (#7799)
This commit is contained in:
parent
e0c0129693
commit
ff0680f69d
4 changed files with 11 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue