diff --git a/client.go b/client.go index 155dd8b..1969f1e 100644 --- a/client.go +++ b/client.go @@ -86,8 +86,9 @@ func (c *Client) Do(req *Request) (*Response, error) { if req.Host != "" { hostname, port, err = net.SplitHostPort(req.Host) if err != nil { - // Port is required - return nil, err + // Likely no port + hostname = req.Host + port = "1965" } // Punycode hostname hostname, err = punycodeHostname(hostname) diff --git a/request.go b/request.go index b111388..5356112 100644 --- a/request.go +++ b/request.go @@ -19,7 +19,7 @@ type Request struct { URL *url.URL // For client requests, Host optionally specifies the server to - // connect to. It must be of the form "host:port". + // connect to. It may be of the form "host" or "host:port". // If empty, the value of URL.Host is used. // For international domain names, Host may be in Punycode or // Unicode form. Use golang.org/x/net/idna to convert it to