geminispace.info

gemini search engine
git clone https://git.clttr.info/geminispace.info.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit e47d78ce3055828ef68ff56c4dd81daf8d06699f
parent 6b5a9f7b4c61d777d5e941ee6b93cf98c27f7410
Author: René Wagner <rwa@clttr.info>
Date:   Wed, 14 Jul 2021 21:01:05 +0200

treat schemeless links as non-gemini links

a scheme is mandatory per spec
https://lists.orbitalfox.eu/archives/gemini/2020/003646.html

closes #12

Diffstat:
Mgus/lib/gemini.py | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gus/lib/gemini.py b/gus/lib/gemini.py @@ -123,10 +123,9 @@ class GeminiResource: # could be: test url_split = url.split("/") if is_domain(url_split[0]): - # prepend with "gemini://" so built-in urlsplit will extract - # the host properly, and continue on - url = "gemini://{}".format(url) - u = urlsplit(url, "gemini") + # treat schemeless uris as non-gemini as announced in + # https://lists.orbitalfox.eu/archives/gemini/2020/003646.html + return None, None else: # process relative link if fully_qualified_parent_url is None: