From e788e31dac1da1a07898f260eccd54a5cac28a33 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Sun, 12 Jan 2020 00:45:38 -0500 Subject: [PATCH] #4 infer missing scheme as gemini --- jetforce.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetforce.py b/jetforce.py index 2a64bc9..a98175d 100755 --- a/jetforce.py +++ b/jetforce.py @@ -83,7 +83,8 @@ class Request: self.url = environ["GEMINI_URL"] url_parts = urllib.parse.urlparse(self.url) - self.scheme = url_parts.scheme + # If scheme is missing, infer it as gemini:// + self.scheme = url_parts.scheme or "gemini" self.hostname = url_parts.hostname self.port = url_parts.port self.path = url_parts.path