~ft/gemnine

fbf4ef21fadd62b526cb83c656c8dfaa4ba5f8b0 — Sigrid Haflínudóttir 2 years ago 22965fb
don't put the default port into expanded urls
1 files changed, 3 insertions(+), 1 deletions(-)

M main.c
M main.c => main.c +3 -1
@@ 39,7 39,9 @@ urlto(Url *url, char *u)
			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 */