Improve host/port handling

...however unlikely gemini over IPv6 may be (hah!)
This commit is contained in:
tjpcc 2023-01-12 09:19:43 -07:00
parent 518d1a88cf
commit 6be546d46b
1 changed files with 1 additions and 1 deletions

View File

@ -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)