Ambiguity in the gemini document spec

solderpunk solderpunk at SDF.ORG
Sun May 17 10:55:57 BST 2020


On Sun, May 17, 2020 at 08:57:13AM +0000, jan6 at tilde.ninja wrote:
> May 17, 2020 11:53 AM, "Fabio" <fabrixxm at kirgroup.net> wrote:
> > =>[<whitespace>]<URL>[<whitespace><USER-FRIENDLY LINK NAME>]<CR><LF>
> > 
> > =>gemini://example.org/bar Yet another example link at the same host
> > 
> > so, the first whitespace can be a zero number of consecutive spaces or tabs :)
> 
> it also says that
> 
> * Square brackets indicate that the enclosed content is
>   optional.

The bigger problem here (which somebody mentioned in a HN comment) which
definitely needs fixing is that "any non-zero number of spaces/tabs"
includes, say, 13 tabs per atom in the universe.

I actually got a patch for AV-98 recently to address this.  Somebody
wrote a proof-of-concept server which sends infinitely long response
headers and AV-98 stupidly slurped it all down until the Linux OOM
killer stepped in.

(which is as much sloppy programming on my part as it is a problem with
the spec - in principle, a well-written client could slurp down and
immediately discard insignificant whitespace)

But clearly the spec needs to place a maximum length on response
headers.

Cheers,
Solderpunk



More information about the Gemini mailing list