cURL / Mailing Lists / curl-library / Single Mail

curl-library

Gopher support and gopher+ selectors

From: François Revol <revol_at_free.fr>
Date: Thu, 28 Apr 2011 15:55:09 +0200

Hi,
I added gopher: support to NetSurf last week, cf. my branch:

http://source.netsurf-browser.org/branches/mmu_man/netsurf-gopher-support/

... and it works not too bad, though I still have some issues with some selectors that libcurl seems to convert to Gopher+ without being told to or something alike.
For example the pages about Bucktooth:
gopher://gopher.floodgap.com/1/buck/dbrowse?glossary
gopher://gopher.floodgap.com/1/buck/dbrowse?faquse
return items with an extra tab screwing up the urls to something like:
gopher://faquse?1:gopher.floodgap.com/0/buck/dbrowse

While escaping the ? to %3f libcurl doesn't replace it with a tab and the page we get has correct selectors:
gopher://gopher.floodgap.com/1/buck/dbrowse%3ffaquse
and then I generate correct urls like:
gopher://gopher.floodgap.com/0/buck/dbrowse?faquse%201
which work correctly.

Also, gopher should probably be made a default in curl's configure since it doesn't imply any dependency, as I had to hack around with the MacPort file to add --enable-gopher (and force NetSurf to find this one instead of Apple's old one), and it's probably alike on other platforms, at least it is on Haiku too.

Also I think it should be possible to have libcurl map the gopher error condition to the http status along with mime types when possible (for type 0 and g items for example). cf. fetch_curl_data() in content/fetchers/curl.c.

Some screenshots:
http://revolf.free.fr/beos/shots/shot_netsurf_gopher_vs_fx2_005.png
http://revolf.free.fr/osx/shots/shot_osx_netsurf_gopher_006.png

Happy 20th year Gopher !

François.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-28