Hello Lynx-dev, I have made a patch to add support for Gopher's "hURL" functionality. The patch is attached and applies to "src/LYGetFile.c". I'm not well-versed in the C language so forgive me if I've made any errors.
See also: The thread "[Lynx-dev] Extend gopher client functionality to support URL scheme" from May 2016 on this very mailing list. -- Viatrix she|they https://viatrix.is-hella.gay
--- LYGetFile.c 2018-04-01 08:27:18.000000000 -0700 +++ LYGetFile2.c 2023-11-12 13:40:20.170392644 -0800 @@ -741,6 +741,19 @@ FREE(tmp); url_type = HTTP_URL_TYPE; } + else if ((cp = StrChr(doc->address + 9, '/')) != NULL && + 0 == StrNCmp(++cp, "hURL", 4)) { + StrAllocCopy(tmp, cp + 4); + HTUnEscape(tmp); + if (*tmp == ':') { + CTRACE((tfp, "getfile: URL '%s'\n", doc->address)); + StrAllocCopy(doc->address,tmp + 1); + FREE(tmp); + CTRACE((tfp, " changed to '%s'\n", doc->address)); + return getfile(doc, target); + } + else FREE(tmp); + } } if (url_type == HTTP_URL_TYPE ||
pgprbqrTnS2Ag.pgp
Description: OpenPGP digital signature