-- Leo's gemini proxy

-- Connecting to illegaldrugs.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Optional trailing backslash in URL

No.12 By mozz on Thu, 24 Dec 2020 19:00:19 +0000


It looks like the trailing backslash is optional, e.g. these both work


gemini://illegaldrugs.net/cgi-bin/motm/boards

gemini://illegaldrugs.net/cgi-bin/motm

gemini://illegaldrugs.net/cgi-bin

gemini://illegaldrugs.net

gemini:/

gemini:

gemini://illegaldrugs.net/cgi-bin/motm/boards/

gemini://illegaldrugs.net/cgi-bin/motm/boards

gemini://illegaldrugs.net/cgi-bin/motm

gemini://illegaldrugs.net/cgi-bin

gemini://illegaldrugs.net

gemini:/

but with the trailing slash, the relative links on the page don't resolve correctly


Reply

Append

----

Hmm, I guess I'll keep things the way they are for now then, thanks.

No.25 By sose on Sat, 26 Dec 2020 19:32:12 +0000

----

I should add that jetforce won't mess with PATH_INFO since it's a "virtual directory" so it's totally up to the CGI script to decide how to resolve that path.

No.24 By mozz on Fri, 25 Dec 2020 20:18:02 +0000

----

It's really up to you as long as there's consistency with the accepted URLs and how you format your relative links.

No.23 By mozz on Fri, 25 Dec 2020 20:12:27 +0000

----

Jetforce will send a redirect if you request a directory without the slash at the end. Astrobotany on the other hand defines most routes without trailing slashes.

No.22 By mozz on Fri, 25 Dec 2020 20:10:38 +0000

----

Not sure if this is normal behavior or not but for now I've implemented a hacky solution that redirects to a link without a trailing slash if the user included one. I'm using jetforce so perhaps you could provide some insight mozz :)

No.19 By sose on Thu, 24 Dec 2020 21:43:07 +0000

----

Hmm, it seems to be that when the trailing slash is included, relative links are considered relative to the current page, but when the trailing slash is ommited, relative links are considered relative to the parent instead. When testing I always ommited the trailing slash, so all the links are set to be relative to the *parent* of the current page

No.18 By sose on Thu, 24 Dec 2020 21:30:55 +0000

----

I think this is a lagrange bug actually - not escaping characters in the query string

No.15 By mozz on Thu, 24 Dec 2020 19:17:22 +0000

----

Also when I typed that URL into my input box, the server sent me on a redirect loop and well.. you can see what happened. Maybe a bug with forward slashes in the query string?

No.13 By mozz on Thu, 24 Dec 2020 19:07:15 +0000

----


back to board


-- Response ended

-- Page fetched on Sun Jun 16 18:41:38 2024