From 74979aee1af6befd09781e07801cc1298c4b2e46 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 8 Mar 2019 01:54:28 +0200 Subject: [PATCH] Fix plugin webapp URL cloning --- maubot/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maubot/server.py b/maubot/server.py index 73de847..9a10cd6 100644 --- a/maubot/server.py +++ b/maubot/server.py @@ -55,8 +55,9 @@ class MaubotServer: async def handle_plugin_path(self, request: web.Request) -> web.Response: for path, app in self.plugin_routes.items(): if request.path.startswith(path): - request = request.clone( - rel_url=request.rel_url.with_path(request.rel_url.path[len(path):])) + request = request.clone(rel_url=request.rel_url + .with_path(request.rel_url.path[len(path):]) + .with_query(request.query_string)) return await app.handle(request) return web.Response(status=404)