Case-sensitive hostnames
Michael Lazar
lazar.michael22 at gmail.com
Fri Nov 26 20:18:17 GMT 2021
On Sat, Nov 20, 2021 at 2:37 AM Matthias Portzel
<matthiasportzel at gmail.com> wrote:
> However, I then tried requesting different capitalizations of other popular Gemini capsules. And hardly any of them responded to changed capitalizations. I believe Molly Brown, Agate, Jetforce, and others, do this simple case-sensitive hostname check.
Greetings,
I went to fix this in Jetforce because I don't remember ever
implementing a case-insensitive check, but it looks like it already
works! It turns out that if you're using the python standard library
URL parser, it will automatically lowercase the hostname component for
you.
```
>>> from urllib.parse import urlparse
>>>
>>> urlparse("gemini://MOZZ.US").hostname
'mozz.us'
```
=> gemini://MOZZ.US
- Michael
More information about the Gemini
mailing list