mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
dont panic on empty SRV segments (#5173)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -82,6 +82,9 @@ func parseRequest(name, zone string) (r recordRequest, err error) {
|
||||
|
||||
// stripUnderscore removes a prefixed underscore from s.
|
||||
func stripUnderscore(s string) string {
|
||||
if len(s) == 0 {
|
||||
return s
|
||||
}
|
||||
if s[0] != '_' {
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user