mirror of
https://github.com/coredns/coredns.git
synced 2026-10-09 03:55:21 -04:00
ResponseReverter.WriteMsg calls res1.Copy() without checking res1 for nil, so any plugin further down the chain that writes a nil response (for example a handler returning (dns.RcodeSuccess, nil) after w.WriteMsg(nil)) panics here. Return an error instead, mirroring the nil guard recently added to plugin/cache's ResponseWriter.WriteMsg (#8512). Signed-off-by: zjncs <18910855655@163.com>
6.4 KiB
6.4 KiB