mirror of
https://github.com/coredns/coredns.git
synced 2025-11-08 21:16:24 -05:00
middleware/file: fix delegations (#376)
Fix the delegation handling in the *file* and *dnssec* middleware. Refactor tests a bit and show that they are failling. Add a Tree printer, cleanups and tests. Fix wildcard test - should get no answer from empty-non-terminal
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
// The function orders names in DNSSEC canonical order: RFC 4034s section-6.1
|
||||
//
|
||||
// See http://bert-hubert.blogspot.co.uk/2015/10/how-to-do-fast-canonical-ordering-of.html
|
||||
// for a blog article on this implementation.
|
||||
// for a blog article on this implementation, although here we still go label by label.
|
||||
//
|
||||
// The values of a and b are *not* lowercased before the comparison!
|
||||
func less(a, b string) int {
|
||||
@@ -24,6 +24,7 @@ func less(a, b string) int {
|
||||
if oka && okb {
|
||||
return 0
|
||||
}
|
||||
|
||||
// sadly this []byte will allocate... TODO(miek): check if this is needed
|
||||
// for a name, otherwise compare the strings.
|
||||
ab := []byte(a[ai:aj])
|
||||
|
||||
Reference in New Issue
Block a user