From 85536d37484294e0ad4d04636e7fb400e6552375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sat, 6 Feb 2021 15:06:15 +0100 Subject: [PATCH] Fix strange 308 error code when using slash-less invite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That seems to be some Quart-internal redirect which isn’t executed correctly (probably due to our makeshift error handlers). So I make this a proper redirect instead. --- snikket_web/invite.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snikket_web/invite.py b/snikket_web/invite.py index a81bf03..97bf0fb 100644 --- a/snikket_web/invite.py +++ b/snikket_web/invite.py @@ -48,6 +48,10 @@ def context() -> typing.Mapping[str, typing.Any]: @bp.route("/") +async def view_old(id_: str) -> quart.Response: + return redirect(url_for(".view", id_=id_)) + + @bp.route("//") async def view(id_: str) -> str: try: