mirror of
https://github.com/coredns/coredns.git
synced 2025-11-06 03:56:24 -05:00
@@ -36,6 +36,7 @@ func NewRecorder(w dns.ResponseWriter) *Recorder {
|
|||||||
// WriteMsg records the status code and calls the
|
// WriteMsg records the status code and calls the
|
||||||
// underlying ResponseWriter's WriteMsg method.
|
// underlying ResponseWriter's WriteMsg method.
|
||||||
func (r *Recorder) WriteMsg(res *dns.Msg) error {
|
func (r *Recorder) WriteMsg(res *dns.Msg) error {
|
||||||
|
r.Rcode = res.Rcode
|
||||||
// We may get called multiple times (axfr for instance).
|
// We may get called multiple times (axfr for instance).
|
||||||
// Save the last message, but add the sizes.
|
// Save the last message, but add the sizes.
|
||||||
r.Len += res.Len()
|
r.Len += res.Len()
|
||||||
|
|||||||
Reference in New Issue
Block a user