#4 infer missing scheme as gemini

This commit is contained in:
Michael Lazar 2020-01-12 00:45:38 -05:00
parent d0be7942d9
commit e788e31dac
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,8 @@ class Request:
self.url = environ["GEMINI_URL"] self.url = environ["GEMINI_URL"]
url_parts = urllib.parse.urlparse(self.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.hostname = url_parts.hostname
self.port = url_parts.port self.port = url_parts.port
self.path = url_parts.path self.path = url_parts.path