From 6be546d46bb1d970c20cdd778dc6591989628803 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Thu, 12 Jan 2023 09:19:43 -0700 Subject: Improve host/port handling ...however unlikely gemini over IPv6 may be (hah!) --- gemini/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gemini') diff --git a/gemini/client.go b/gemini/client.go index 05ab8cd..0e8dd07 100644 --- a/gemini/client.go +++ b/gemini/client.go @@ -38,7 +38,7 @@ func (client Client) RoundTrip(request *Request) (*Response, error) { host := request.Host if _, port, _ := net.SplitHostPort(host); port == "" { - host += ":1965" + host = net.JoinHostPort(host, "1965") } conn, err := tls.Dial("tcp", host, client.tlsConf) -- cgit v1.2.3