diff options
author | Matthew Hodgson <matthew@matrix.org> | 2016-03-29 01:20:25 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2016-03-29 01:20:25 +0100 |
commit | e0c2490a145550310edb3ad0a414aa1840ef3ce4 (patch) | |
tree | 3d9ba7834e859171397ac7136ccb82123b4cd8ce /synapse/http/server.py | |
parent | Merge branch 'develop' into matthew/preview_urls (diff) | |
parent | typo (diff) | |
download | synapse-e0c2490a145550310edb3ad0a414aa1840ef3ce4.tar.xz |
Merge branch 'develop' into matthew/preview_urls
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index b17b190ee5..b82196fd5e 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -18,6 +18,7 @@ from synapse.api.errors import ( cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError, Codes ) from synapse.util.logcontext import LoggingContext, PreserveLoggingContext +from synapse.util.caches import intern_dict import synapse.metrics import synapse.events @@ -229,11 +230,12 @@ class JsonResource(HttpServer, resource.Resource): else: servlet_classname = "%r" % callback - args = [ - urllib.unquote(u).decode("UTF-8") if u else u for u in m.groups() - ] + kwargs = intern_dict({ + name: urllib.unquote(value).decode("UTF-8") if value else value + for name, value in m.groupdict().items() + }) - callback_return = yield callback(request, *args) + callback_return = yield callback(request, **kwargs) if callback_return is not None: code, response = callback_return self._send_response(request, code, response) |