-- Leo's gemini proxy
-- Connecting to freeshell.de:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini;lang=en-GB
At smol.pub users can create an account with an underscore in the name. That's then used in the host name of their capsule.
Is an underscore a valid character in a host name? Stack Overflow answers suggest not...
...but clients seem to be OK with it.
Why do I care? Because my client doesn't cope with underscores in host names. It would have done, but I added support for internationalised names and punycode, and the library method I'm using for puny-encoding complains about non-LDH characters (where LDH is letter, digit, hyphen). Given that other clients are relaxed about underscores, I probably should be too. I was assuming that it was always ok to puny-encode the host because if there's nothing to do it just returns the input. But now I have to insert logic to check if the hostname is "LDH+underscore" first.
(Note the part on why this principle might not be so great)
Oops, tech post! Please return to your normal Gemini programming. 8~)
-- Response ended
-- Page fetched on Sat May 4 01:38:22 2024