commit 8a0c456fb9c75aa7c0930da9ecd67a53bc623749
parent c5b0648dcce6706d8131ef068c1587edaa54e941
Author: Natalie Pendragon <natpen@natpen.net>
Date: Tue, 11 Aug 2020 08:18:04 -0400
Fix bug in GeminiResource url construction
It wasn't adding the colon to the scheme of URLs that started with
"//".
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gus/lib/gemini.py b/gus/lib/gemini.py
@@ -143,7 +143,7 @@ class GeminiResource():
return None
if self._fetchable_url is None:
if self.is_relative:
- # leave of fragment portion of urlsplit at [4]
+ # leave off fragment portion of urlsplit at [4]
urlsplit_parts = list(self.urlsplit[:4])
urlsplit_parts.append("")
@@ -153,10 +153,10 @@ class GeminiResource():
if raw_url_lower.startswith("gemini://"):
url = self.raw_url
elif raw_url_lower.startswith("//"):
- url = "gemini{}".format(self.raw_url)
+ url = "gemini:{}".format(self.raw_url)
else:
url = "gemini://{}".format(self.raw_url)
- # leave of fragment portion of urlsplit at [4]
+ # leave off fragment portion of urlsplit at [4]
if self.urlsplit[4] != "":
url = url.replace("#{}".format(self.urlsplit[4]), "")
self._fetchable_url = url