Noticing a problem when clicking on links that have other links URL encoded in them.
Here is a page from Gemipedia. It contains links to images.
gemini://gemi.dev/cgi-bin/wp.cgi/images?Moon
The Urls in the links contain an HTTP URL that is passed via the query string. Looking at the Gemtext, you can see a properly encoded URL:
# Image Gallery: Moon
[...snip...]
=> /cgi-bin/wp.cgi/media/media.jpg?https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2Fe%2Fe1%2FFullMoon2010.jpg%2F440px-FullMoon2010.jpg The near side of the Moon (north is at top)
When clicking with this link with Buran v1.7, this is the incoming URL that I see in my logs:
Notice that the / characters in the query string are not sent URL encoded. It also appears that the // in the https:// has be reduced down to a single /.
When I make this request with Lagrange or other clients, I see the correct URL requested in my logs:
The biggest issue here is changing the encoded // to a single /, This means my server-side code gets an invalid URL from the query string, and I cannot fetch the needed image
Noticing a problem when clicking on links that have other links URL encoded in them.
Here is a page from Gemipedia. It contains links to images.
The Urls in the links contain an HTTP URL that is passed via the query string. Looking at the Gemtext, you can see a properly encoded URL:
When clicking with this link with Buran v1.7, this is the incoming URL that I see in my logs:
Notice that the
/
characters in the query string are not sent URL encoded. It also appears that the//
in thehttps://
has be reduced down to a single/
.When I make this request with Lagrange or other clients, I see the correct URL requested in my logs:
The biggest issue here is changing the encoded
//
to a single/
, This means my server-side code gets an invalid URL from the query string, and I cannot fetch the needed image