Fix ipv6 stuffs 7
This commit is contained in:
@@ -215,10 +215,9 @@ func (r *HTTPClient) replaceHostIfNeeded(req *http.Request) {
|
||||
return
|
||||
}
|
||||
// if hosts are found, ensure the host is an IPv6 host
|
||||
host, port, err := net.SplitHostPort(req.URL.Host)
|
||||
host, _, err := net.SplitHostPort(req.URL.Host)
|
||||
if err != nil {
|
||||
host = req.URL.Host // Use the host without port
|
||||
port = "443" // Default HTTPS port
|
||||
}
|
||||
found := false
|
||||
for _, h := range r.ipv6Hosts {
|
||||
|
||||
Reference in New Issue
Block a user