[spec] adding a "magic number" for gemini files

Solderpunk solderpunk at posteo.net
Sat Dec 26 15:34:25 GMT 2020


On Sat Dec 26, 2020 at 4:32 PM CET, cage wrote:

> I think a lot of guesswork is needed (line finding link lines with
> gemini scheme?), for example, to discriminate between markdown and
> gemini file format.

When is this really necessary?  Both Gemini and HTTP provide a means to
inform the client what's coming down the pipe.  For files distributed
otherwise, filename conventions would seem to do the trick.

> I wonder if a magic number (three, maybe four chars?) could be added
> on the first line of each file.

This feels like too much complexity for too little benefit to me.
Plenty of people write their text/gemini content by hand with a standard
text editor.  Many of them will forget to add the magic number.  What
should a client do when it receives a file which the server declares as
text/gemini but which doesn't have the magic number?  This creates more
questions/problems than it solves.

Cheers,
Solderpunk


More information about the Gemini mailing list