[tech] Funny endless redirection

Luke Emmet luke at marmaladefoo.com
Sat Jan 16 11:04:26 GMT 2021



On 16-Jan-2021 10:51, Luke Emmet wrote:
>
> On 16-Jan-2021 09:58, Stephane Bortzmeyer wrote:
>> The capsule gemini.marmaladefoo.com has a funny
>> redirection. <gemini://gemini.marmaladefoo.com/geminaut?name=gerald>
>> redirects to <gemini://gemini.marmaladefoo.com/geminaut?name=gerald/>
>> which redirects to
>> <gemini://gemini.marmaladefoo.com/geminaut?name=gerald//> and so on
>> until you run out of slashes :-)
>
> Hmm - there is something strange about that URL - it might be molly 
> brown redirecting. I'll investigate.
>
Yes - it seems to be a molly brown bug.

If you take a valid URL that references a folder not having a trailing 
slash, and add a query to it, molly brown goes off on an endless redirect.

For example, try this one:

gemini://gemini.circumlunar.space/capcom?foo

1. Here the "capcom" folder exists with an index.gmi therein
2. Molly brown thereby puts a slash on the end of the URL, but what it 
should do is put a slash after the capcom maybe, thus

gemini://gemini.circumlunar.space/capcom/?foo

not

gemini://gemini.circumlunar.space/capcom?foo/

in this second case, molly brown will redirect again to


gemini://gemini.circumlunar.space/capcom?foo//

and so on.

I'll let solderpunk know.

In the mean time, I suggest not to construct strange parameterised URLs 
to folder URLs on molly brown!

  - Luke


More information about the Gemini mailing list