Revert "Validate zone during normalization (#3165)" (#3167)

This reverts commit f888c5f7f6.
This commit is contained in:
Yong Tang
2019-08-21 08:01:45 -07:00
committed by Chris O'Haver
parent f888c5f7f6
commit 1b3fb834da
2 changed files with 1 additions and 9 deletions

View File

@@ -3,7 +3,6 @@ package dnsserver
import (
"fmt"
"net"
"net/url"
"strings"
"github.com/coredns/coredns/plugin"
@@ -53,13 +52,7 @@ func normalizeZone(str string) (zoneAddr, error) {
}
}
z := zoneAddr{Zone: dns.Fqdn(host), Port: port, Transport: trans, IPNet: ipnet}
_, err = url.ParseRequestURI(z.String())
if err != nil {
return zoneAddr{}, err
}
return z, nil
return zoneAddr{Zone: dns.Fqdn(host), Port: port, Transport: trans, IPNet: ipnet}, nil
}
// SplitProtocolHostPort splits a full formed address like "dns://[::1]:53" into parts.

View File

@@ -28,7 +28,6 @@ func TestNormalizeZone(t *testing.T) {
{"https://.:8443", "https://.:8443", false},
{"https://..", "://:", true},
{"https://.:", "://:", true},
{"dns://.:1053{.:53", "://:", true},
} {
addr, err := normalizeZone(test.input)
actual := addr.String()