diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-01-12 09:19:43 -0700 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-01-12 09:19:43 -0700 |
commit | 6be546d46bb1d970c20cdd778dc6591989628803 (patch) | |
tree | f045d636f7a9bea0147ad037918ceaf6536d66b4 /gemini/client.go | |
parent | 518d1a88cf162ea9a52a93e3708e99777adab454 (diff) |
Improve host/port handling
...however unlikely gemini over IPv6 may be (hah!)
Diffstat (limited to 'gemini/client.go')
-rw-r--r-- | gemini/client.go | 2 |
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) |