From 6c414ca9d45091b177cc174bfbf7bf9ed43ed5ec Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Sun, 12 Jan 2020 14:00:42 -0500 Subject: [PATCH] #5 Permenant redirect for root URL if missing slash --- jetforce.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetforce.py b/jetforce.py index a98175d..d929ee5 100755 --- a/jetforce.py +++ b/jetforce.py @@ -241,7 +241,7 @@ class StaticDirectoryApplication(JetforceApplication): return Response(Status.SUCCESS, mimetype, generator) elif filesystem_path.is_dir(): - if request.path and not request.path.endswith("/"): + if not request.path.endswith("/"): url_parts = urllib.parse.urlparse(request.url) url_parts = url_parts._replace(path=request.path + "/") return Response(Status.REDIRECT_PERMANENT, url_parts.geturl()) @@ -346,7 +346,7 @@ class GeminiRequestHandler: writer: asyncio.StreamWriter received_timestamp: time.struct_time remote_addr: str - client_crt: dict + client_cert: dict url: str status: int meta: str