From 46e10da3a844bd72485772242a28fa4d88ee8b58 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Sun, 14 Feb 2021 19:02:34 -0500 Subject: Make Request.Host optional --- punycode.go | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'punycode.go') diff --git a/punycode.go b/punycode.go index cf0ecb4..58f84e5 100644 --- a/punycode.go +++ b/punycode.go @@ -26,21 +26,3 @@ func punycodeHostname(hostname string) (string, error) { } return idna.Lookup.ToASCII(hostname) } - -// punycodeHost returns the punycoded version of host. -// host may contain a port. -func punycodeHost(host string) (string, error) { - hostname, port, err := net.SplitHostPort(host) - if err != nil { - hostname = host - port = "" - } - hostname, err = punycodeHostname(hostname) - if err != nil { - return "", err - } - if port == "" { - return hostname, nil - } - return net.JoinHostPort(hostname, port), nil -} -- cgit v1.2.3