Improve host/port handling
...however unlikely gemini over IPv6 may be (hah!)
This commit is contained in:
parent
518d1a88cf
commit
6be546d46b
|
@ -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)
|
||||
|
|
Reference in New Issue