support gophers:// by falling back to a plain-text connection (for now) - gopher-validator - Gopher validator and happy helper
(HTM) git clone git://git.codemadness.org/gopher-validator
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 64637a629bba96236e6bf1aae8fca1cc5710bbb2
(DIR) parent 5ede5b1c7e76a0451271b284651574fc2b5a8b86
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 3 Aug 2024 15:08:12 +0200
support gophers:// by falling back to a plain-text connection (for now)
Diffstat:
M gopher-validator.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/gopher-validator.c b/gopher-validator.c
@@ -536,9 +536,11 @@ main(int argc, char **argv)
if (!strncmp(uri, "gopher://", sizeof("gopher://") - 1))
uri += sizeof("gopher://") - 1;
+ else if (!strncmp(uri, "gophers://", sizeof("gophers://") - 1))
+ uri += sizeof("gophers://") - 1;
if (!parseuri(uri, &u))
- die("Invalid uri\n");
+ die("Invalid URI\n");
if (u.host[0] == '\0')
die("Invalid hostname\n");