[spec] adding a "magic number" for gemini files
cage
cage-dev at twistfold.it
Sat Dec 26 15:54:22 GMT 2020
On Sat, Dec 26, 2020 at 04:34:25PM +0100, Solderpunk wrote:
> 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 was thinking abot file(1) and libmagic in general.
> > 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.
Anyway i agree this was a silly proposal, thank you for you reply! :)
Bye!
C.
More information about the Gemini
mailing list