summaryrefslogtreecommitdiff
path: root/gemini
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-12 09:19:43 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-12 09:19:43 -0700
commit6be546d46bb1d970c20cdd778dc6591989628803 (patch)
treef045d636f7a9bea0147ad037918ceaf6536d66b4 /gemini
parent518d1a88cf162ea9a52a93e3708e99777adab454 (diff)
Improve host/port handling
...however unlikely gemini over IPv6 may be (hah!)
Diffstat (limited to 'gemini')
-rw-r--r--gemini/client.go2
1 files changed, 1 insertions, 1 deletions
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)