makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.14k stars 68 forks source link

don't url-decode slash or plus in redirect URLs #322

Closed autumnull closed 1 year ago

autumnull commented 1 year ago

If amfora receives a response that looks like this:

30 gemini://example.org/some%2Fpath/to%2Ba%2Bpage/

It decodes this and tries to access the page at

gemini://example.org/some/path/to+a+page/

This is a different url to the one given in the redirect -- the / character is a path separator, but %2F is not. Amfora should not decode these characters when handling redirects.

makew0rld commented 1 year ago

Good point! This is often a tricky thing, but most likely just not altering URLs is the way to go. I'm not working on Amfora much at the moment, so either I'll get around to this at some point, or would accept a PR. Thanks!