mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-23 12:09:24 -05:00
SYN-141: Encode query params as UTF-8.
This commit is contained in:
parent
a7f470d1d9
commit
3e54d70ae2
@ -260,7 +260,13 @@ class MatrixHttpClient(BaseHttpClient):
|
||||
"""
|
||||
logger.debug("get_json args: %s", args)
|
||||
|
||||
query_bytes = urllib.urlencode(args, True)
|
||||
encoded_args = {}
|
||||
for k, vs in args.items():
|
||||
if isinstance(vs, basestring):
|
||||
vs = [vs]
|
||||
encoded_args[k] = [v.encode("UTF-8") for v in vs]
|
||||
|
||||
query_bytes = urllib.urlencode(encoded_args, True)
|
||||
logger.debug("Query bytes: %s Retry DNS: %s", args, retry_on_dns_fail)
|
||||
|
||||
def body_callback(method, url_bytes, headers_dict):
|
||||
|
Loading…
Reference in New Issue
Block a user