From c4fd7358b9ba19c97f497d2c5a87171a9aa84ec3 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 11 Jan 2024 03:07:55 +0100 Subject: [PATCH] Fix ipv6 stuffs 7 --- pkg/http/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/http/client.go b/pkg/http/client.go index e9cff53..47d9d3f 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -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 {