middleware/autopath: some fixes (#883)

* middleware/autopath: some fixes

This fix a small issue in autopath, but unearthed a bigger one.
See #881.

* Fix test
This commit is contained in:
Miek Gieben 2017-08-10 19:27:54 +01:00 committed by GitHub
parent 6cc3f47d46
commit 4d0dae8deb
3 changed files with 29 additions and 16 deletions

View file

@ -31,6 +31,7 @@ var autopathTestCases = []test.Case{
func newTestAutoPath() *AutoPath {
ap := new(AutoPath)
ap.Zones = []string{"."}
ap.Next = nextHandler(map[string]int{
"b.example.org.": dns.RcodeNameError,
"b.com.": dns.RcodeSuccess,