pygopherd
pygopherd copied to clipboard
Add an OpenStreetMap pyg gateway
I wrote this like 10 years ago, and just noticed PyGopherd was still maintained… Just fixed it so it works again.
Seems the search and geo handlers don't seem to work though, so more patching required. But providing the location directly in the URL does work.
Hmm I'm wondering if queries actually work at all, things like /osm.pyg|/geo?=10%2C10 don't get passed to the handler at all. (my NetSurf Gopher patch uses regular HTML forms as a hack so they pass = but still it should work.)
And /osm.pyg?=10%2C10 just passes 10,10 as selectorargs instead of searchrequest!?
Hey! You probably need to use a tab character (%09) instead of a question mark to indicate the search string.
e.g. /osm.pyg%0910%2C10
Some web-based gopher clients (I know lynx does) will do this automatically for you when they see a gopher URL with a question mark in it, but according to the gopher URL RFC 4266 you need to use an encoded tab character.
I seemed to recall cURL which NetSurf uses actually converted the ? into a tab by itself, but I guess either it doesn't anymore or…
At least it does work when I search in Veronica, but maybe it accepts both.
Ok, just checked with netcat and I get the '?' passed literally. So yeah, something to fix there.
I seemed to recall
cURLwhich NetSurf uses actually converted the?into a tab by itself, but I guess either it doesn't anymore or… At least it does work when I search in Veronica, but maybe it accepts both.
https://github.com/curl/curl/pull/2910 😄
:shrug: