diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-12 15:05:37 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-12 15:05:37 +0000 |
commit | 7b43a503f31e47b0eae9fe2b12fbea5e7fd280f5 (patch) | |
tree | cd4846d41b43bc9e5964693fa072b2860507c9ae /synapse/rest/directory.py | |
parent | Store json as UTF-8 and not bytes (diff) | |
download | synapse-7b43a503f31e47b0eae9fe2b12fbea5e7fd280f5.tar.xz |
Consistently url decode and decode as utf 8 the URL parts
Diffstat (limited to 'synapse/rest/directory.py')
-rw-r--r-- | synapse/rest/directory.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/synapse/rest/directory.py b/synapse/rest/directory.py index 35300c6a6f..7b2b18dbcd 100644 --- a/synapse/rest/directory.py +++ b/synapse/rest/directory.py @@ -36,9 +36,7 @@ class ClientDirectoryServer(RestServlet): @defer.inlineCallbacks def on_GET(self, request, room_alias): - room_alias = self.hs.parse_roomalias( - urllib.unquote(room_alias).decode("utf-8") - ) + room_alias = self.hs.parse_roomalias(room_alias) dir_handler = self.handlers.directory_handler res = yield dir_handler.get_association(room_alias) @@ -56,9 +54,7 @@ class ClientDirectoryServer(RestServlet): logger.debug("Got content: %s", content) - room_alias = self.hs.parse_roomalias( - urllib.unquote(room_alias).decode("utf-8") - ) + room_alias = self.hs.parse_roomalias(room_alias) logger.debug("Got room name: %s", room_alias.to_string()) @@ -97,9 +93,7 @@ class ClientDirectoryServer(RestServlet): dir_handler = self.handlers.directory_handler - room_alias = self.hs.parse_roomalias( - urllib.unquote(room_alias).decode("utf-8") - ) + room_alias = self.hs.parse_roomalias(room_alias) yield dir_handler.delete_association( user.to_string(), room_alias |