middleware/file|auto: Notifies and AXFR (#399)

Be more explicit in the logs when a notify fails.
New notify error message looks like:

2016/11/07 18:21:42 [ERROR] Notify for zone "example.org." was not accepted by "8.8.8.8:53": rcode was "SERVFAIL"

Correctly pick up secondaries

When multiple secondary are specified make sure they are picked up.

Fixes #393 #398
This commit is contained in:
Miek Gieben
2016-11-07 19:15:21 +00:00
committed by GitHub
parent e89c4b5c28
commit fb7fcff982
4 changed files with 50 additions and 33 deletions

View File

@@ -127,7 +127,7 @@ func autoParse(c *caddy.Controller) (Auto, error) {
a.loader.template = rewriteToExpand(c.Val())
}
// template
// duration
if c.NextArg() {
i, err := strconv.Atoi(c.Val())
if err != nil {
@@ -147,7 +147,9 @@ func autoParse(c *caddy.Controller) (Auto, error) {
if e != nil {
return a, e
}
a.loader.transferTo = t
if t != nil {
a.loader.transferTo = append(a.loader.transferTo, t...)
}
}
}