support gophers:// by falling back to a plain-text connection (for now) - gophe… | |
git clone git://git.codemadness.org/gopher-validator | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 64637a629bba96236e6bf1aae8fca1cc5710bbb2 | |
parent 5ede5b1c7e76a0451271b284651574fc2b5a8b86 | |
Author: Hiltjo Posthuma <[email protected]> | |
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(-) | |
--- | |
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"); | |