shithub: gemnine

Download patch

ref: fbf4ef21fadd62b526cb83c656c8dfaa4ba5f8b0
parent: 22965fbf81ab54511ca4fa66d4e4e597d373be42
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Jun 18 10:50:04 EDT 2020

don't put the default port into expanded urls

--- a/main.c
+++ b/main.c
@@ -39,7 +39,9 @@
 			return smprint("gemini://%s%s", cleanname(u+2), trail);
 
 		/* absolute url, no scheme */
-		return smprint("gemini://%s:%s%s%s", url->server, url->port, cleanname(u), trail);
+		return strcmp(url->port, "1965") == 0 ?
+			smprint("gemini://%s%s%s", url->server, cleanname(u), trail) :
+			smprint("gemini://%s:%s%s%s", url->server, url->port, cleanname(u), trail);
 	}
 
 	/* with scheme */