I was browsing this site in Lagrange and noticed that any 'h' type
(HTTP/S) links in my gophermap weren't shown. Only the Gopher
links appeared. Yet the 'h' lines were visible in other browsers
like Bombadillo.
After spending some time tracking down the problem, I noticed that
my server software (pygopherd) was modifying the selector for these
links by prepending a slash to them.
So, what I had in my gophermap was:
hExample URL:
https://example.com/
But what the server was sending was:
hExample /URL:
https://example.com/
As far as I can tell, this is out-of-spec for the Gopher protocol
(at least considering as HTTP/S links aren't actually "part of the
Gopher spec" at all).
Bombadillo accepts it and does the intended thing. Lagrange ignores
the line.
I was able to fix this by editing gopherentry.py and adding lines
191 and 192 below:
188 def getselector(self, default = None):
189 if self.selector == None:
190 return default
191 if self.type == 'h' and self.selector[0] == '/':
192 return self.selector[1:]
193 return self.selector
In a nutshell: if it's an 'h' line, and the selector has a slash at
the beginning, just return the part after the slash as the selector.
And with that, my HTTP/S links are visible in Lagrange!