pygopherd icon indicating copy to clipboard operation
pygopherd copied to clipboard

Add an OpenStreetMap pyg gateway

Open mmuman opened this issue 2 years ago • 7 comments
trafficstars

I wrote this like 10 years ago, and just noticed PyGopherd was still maintained… Just fixed it so it works again.

mmuman avatar Dec 09 '22 22:12 mmuman

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.

mmuman avatar Dec 09 '22 22:12 mmuman

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!?

mmuman avatar Dec 09 '22 23:12 mmuman

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.

michael-lazar avatar Dec 10 '22 00:12 michael-lazar

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.

mmuman avatar Dec 10 '22 00:12 mmuman

Ok, just checked with netcat and I get the '?' passed literally. So yeah, something to fix there.

mmuman avatar Dec 10 '22 00:12 mmuman

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.

https://github.com/curl/curl/pull/2910 😄

michael-lazar avatar Dec 10 '22 00:12 michael-lazar

:shrug:

mmuman avatar Dec 10 '22 01:12 mmuman