Fixes: debug RR and header bits (#151)

Always set the auth and rd bits in the reply. And reverse the
ownername of debug queries so that manual matching is much easier.
This commit is contained in:
Miek Gieben
2016-05-23 09:16:57 +01:00
parent c30671f4c0
commit 446eaa957d
9 changed files with 31 additions and 31 deletions

View File

@@ -32,12 +32,12 @@ type Etcd struct {
// this name. This is used when find matches when completing SRV lookups
// for instance.
func (g Etcd) Records(name string, exact bool) ([]msg.Service, error) {
path, star := g.PathWithWildcard(name)
path, star := msg.PathWithWildcard(name, g.PathPrefix)
r, err := g.Get(path, true)
if err != nil {
return nil, err
}
segments := strings.Split(g.Path(name), "/")
segments := strings.Split(msg.Path(name, g.PathPrefix), "/")
switch {
case exact && r.Node.Dir:
return nil, nil