[tech] doubts (was Re: [spec] [rfc] SEDR 300 VOLUME I)

John Cowan cowan at ccil.org
Fri Jan 8 22:29:26 GMT 2021

On Fri, Jan 8, 2021 at 1:27 AM Sean Conner <sean at conman.org> wrote:

> You are writing a client, and you come across this link:
> => %2E%2E/%52%3A%20%41%2F%42%20%31%25%20%40%20%24%33%3B%76%3D%31

If we unescape all of the RFC 2396 unreserved characters, we get
"../R%3A%20A%2FB%201%25%20%40%20%243;%3Bv%3D1" (my reference to RFC 2616
was erroneous).  RFC 3986 makes a lot of concessions to WHATWG, and
requires the %2E%2E to be left alone, which changes resolution.  IMO Gemini
should stick with 2396 on this and a number of other points.

This is a relative URI, so this needs to be resolved against the base URI,
> and for this question, the base URI is
>         gemini://example.com/%66%6F%6F/%62%61%72%3B%33/

RFC 2396 doesn't actually allow an unescaped trailing slash in the
pathname, although RFC 3986 does.  If that is removed, then there there are
no escaped reserved characters, so this is equivalent to "gemini://
example.com/foo/bar%3B3/".  Normal URI resolution then gives us "gemini://
example.com/foo/R%3A%20A%2FB%201%25%20%40%20%243;%3Bv%3D1", which is what
should be sent to the server.  Exactly how, if at all, the last component
of the path is translated into a file on the filesystem is completely up to
the server.

That's my best shot.

John Cowan          http://vrici.lojban.org/~cowan        cowan at ccil.org
Evolutionary psychology is the theory that men are nothing but horn-dogs,
and that women only want them for their money.  --Susan McCarthy (adapted)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210108/4d401344/attachment.htm>

More information about the Gemini mailing list