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

Sean Conner sean at conman.org
Fri Jan 8 06:27:09 GMT 2021

It was thus said that the Great John Cowan once stated:
> On Sun, Jan 3, 2021 at 4:55 PM Sean Conner <sean at conman.org> wrote:
> > > By the way, what happens on your implementation if I name the actual
> > > gemini/text like "b%2Fw.gmi"? Burn and crash?
> >
> >   No.  It will be sent as "b/w.gmi".
> In what circumstances?  If the URL bar or text link says "b%2Fw.gmi",
> that's what should be sent to the server; if it says "b/w.gmi", then *that*
> is what should be sent to the server.  The server may treat those
> differently or the same.  The reason is that / is a reserved character.
> The server ought to treat http://abc.com:80/~smith/home.html and
> http://abc.com:80/%7Esmith/home.html exactly the same, per RFC 2616.

  "All non-trivial abstractions, to some degree, are leaky."
		-- Joel Spolsky [1]

  "Doctor, it hurts when I do this."

  "Then stop doing that."
		-- Old vaudville joke.

  I've already rejected tons of replies to this, so I think I'll ask a
question.  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

  This is a relative URI, so this needs to be resolved against the base URI,
and for this question, the base URI is


  How should the client (or a URI/URL/IRI parser) deal with such links. 
What, in your mind, should they manipulate or parse the URLs?  It's not a
matter of "no body should generate such links" because you can't control
that.  The client gets what it gets.

  When I wrote my URL parser, I wrote it to be useful to me (with the hope
that others would find it useful).  But it seems it does The Wrong Thing. 
So in your opinion, what should it, nay, MUST it do?

  Here's the list of references I've been pouring through the past week:

	RFC-1630	Jun 1994
	RFC-1738	Dec 1994
	RFC-1808	Jun 1995
	RFC-2396	Aug 1998
	RFC-3986	Jan 2005
	WHATWG URL	Jan 2021 (it keeps changing) [2]

  Also, do ANY existing URL parsing library get it right?  Please make sure
to justify your answer(s).


[1]	https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/

[2]	https://url.spec.whatwg.org/

More information about the Gemini mailing list