Illusory latency due to trailing slash redirects

solderpunk solderpunk at SDF.ORG
Mon Jun 29 12:08:39 BST 2020


On Sun, Jun 28, 2020 at 08:20:40AM +0000, Krixano wrote:
> Ok, so I have a legitimate question... why are servers even redirecting for something as dumb as a trailing slash anyways?

It might *seem* dumb, but it's essential for relative URLs to work
correctly.  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", but if you are at
"gemini://example.com/foo/" then it turns into
"gemini://example.com/foo/other_page.gmi".  Web servers do this all the
time for exactly the same reason, you just never notice because browsers
never tell you.

Cheers,
Solderpunk


More information about the Gemini mailing list