Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an OpenStreetMap pyg gateway #5

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

mmuman
Copy link

@mmuman mmuman commented Dec 9, 2022

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

It serves tiles directly as images, and allows navigating to tiles in
the cardinal directions.
The tile server wants a User-Agent now, so let's provide one.
@mmuman
Copy link
Author

mmuman commented Dec 9, 2022

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
Copy link
Author

mmuman commented Dec 9, 2022

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

@michael-lazar
Copy link
Owner

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.

@mmuman
Copy link
Author

mmuman commented Dec 10, 2022

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
Copy link
Author

mmuman commented Dec 10, 2022

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

@michael-lazar
Copy link
Owner

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.

curl/curl#2910 😄

@mmuman
Copy link
Author

mmuman commented Dec 10, 2022

🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants