From 2cca527d9f17fd1595366545c47630bf35591873 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sat, 5 Nov 2016 14:39:49 +0000 Subject: 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 --- middleware/file/tree/less.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'middleware/file/tree/less.go') diff --git a/middleware/file/tree/less.go b/middleware/file/tree/less.go index 595dc9213..3b8340088 100644 --- a/middleware/file/tree/less.go +++ b/middleware/file/tree/less.go @@ -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]) -- cgit v1.2.3