Should Gemini clients alert users upon redirect?

Sandra Snan sandra.snan at idiomdrottning.org
Sat Feb 13 21:51:03 GMT 2021


Sean wrote:
> There's a semantic difference between a URL that ends with a '/' and one
> that doesn't.  The one that ends with a '/' is semantically a
> directory

Yes. That's why I removed the slashes and why I all along wanted the
slashes gone.

Sean wrote:
> that doesn't.  The one that ends with a '/' is semantically a directory, and
> to have to add a file per directory to get all URLs to end with a '/' is, in
> my opinion, silly.  I can see what you are trying to do---skip the silly
> ".gmi" or ".gemini" extension as being part of the URL, but there should be
> better ways of doing that that populating a filesystem with a bunch of
> directories containing a single file

It seems like you've got what I want to do somewhat backwards.

You seem to think that I want URLs that end with slashes, i.e. has
directory semantics.
That's what I don't want.
That's why my internal links all along have been without slashes.
That's why I finally fixed the long-standing 31 issue.

And I needed to do programming to do so which is what I didn't wanna do
in the first place. Ugh. You guys roped me in to doing actual work.

The server-side technical implementation behind serving up, for example,
"The Dumbphone Experience" text at
gemini://idiomdrottning.org/dumbphone-experience

should not matter for users.

As far as they're concerned, that's a leaf node named
dumbphone-experience placed in the capsule root.

That's the semantics I want and that's the semantics I've got now. Jolly
good.

(On the server side, I could implement that in a couple of ways; I need
the server to be able to distinguish the page from other files (for
example I also host images, and plain text files) so on the server side,
I need to set up a naming scheme like dumbphone-experience.gmi,
dumbphone-experience.gemini, or dumbphone-experience/index.gmi and then
use server rewriting to serve up the correct node.

It's wholly irrelevant on the client side which of those three is in use
(I'm not mixing the three models, I use one of them). They get a file
named dumbphone-experience with the text/gemini MIME type which is what
they wanted.

Turns out that in order to get different languages for different
pages—which was the first thing I wanted to do on this list back in
August 2020—and this particular server, it's easier to use
dumbphone-experience/index.gmi because then I can also put metadata in
the same directory. Since I needed to reprogram the server anyway, I
could've come up with some cockamamie convention to get per-file
metadata, like dumbphone-experience.gemini and
dumbphone-experience.metadata both in the same folder and then serve
that as dumbphone-experience. Or have preambles that the server strips.
I coulda done it in all tons of ways. Does not matter to clientside
which way I did it.)

Sean wrote:
> Furthermore, if you follow this link, sans a trailing '/':
>
> 	gemini://gemini.conman.org/test/UCSD-Pascal-source.zip
>
> you'll get a ZIP file.  But, add a trailing '/' to that:
>
> 	gemini://gemini.conman.org/test/UCSD-Pascal-source.zip/
>
> and see what you get (hint:  it's not a ZIP file)
>
>   -spc

You posted the same argument in the same kinda patronizing way last
September:

Sean wrote, but way earlier:
> I'm curious as to what the argument against is, because the slash is
> semantically important.
>
> => gemini://gemini.conman.org/test/doc1  This is not a directory.
> => gemini://gemini.conman.org/test/doc1/ And this is not the document you think it is

Semantics is my jam.
Do not try to bring the ruckus vs Idiomdrottning on this.

Sean wrote:
> And then there's the reason for the tailing slash that Solderpunk gives:
>
>       https://lists.orbitalfox.eu/archives/gemini/2020/002000.html

Solderpunk is awesome.♥♥
But he is wrong about this.

Solderpunk writes:
> It might *seem* dumb, but it's essential for relative URLs to work
> correctly.

They work correctly when there is a consistent view which tree nodes are
leaf nodes.

Solderpunk writes:
> Links in text/gemini may be relative URLs, e.g. just
> "other_page.gmi".  It's the client's job to turn that into an absolute
> URL, in accordance with the RFC rules for doing so.  If you are at
> "gemini://example.com/foo", then that relative link turns into
> "gemini://example.com/other_page.gmi"

Which is fine. It's just that foo is a leaf node. That's what I want.
The semantics work, it's just one level up.

True, relative links don't work when you have slashed and unslashed both
working. Because they'll be at different "levels" in the tree. So before
I add any relative links to my pages, I'll need to put in the 31s from
slashed to unslashed (which is the direction they should've been going
all along) so there's only one canonical URL for each page.

Sandra


More information about the Gemini mailing list