mirror of
https://github.com/coredns/coredns.git
synced 2025-12-09 11:55:13 -05:00
fix(rewrite): truncated upstream response (#7277)
Forward information that a upstream response is truncated when rewriting a CNAME. Otherwise, the cache plugin stores the truncated resonse, making it impossible to receive the full response as a client via TCP. Signed-off-by: Yannick Epstein <yannicke@spotify.com>
This commit is contained in:
@@ -100,6 +100,9 @@ func (r *cnameTargetRuleWithReqState) RewriteResponse(res *dns.Msg, rr dns.RR) {
|
||||
}
|
||||
}
|
||||
res.Answer = newAnswer
|
||||
// if not propagated, the truncated response might get cached,
|
||||
// and it will be impossible to resolve the full response
|
||||
res.Truncated = upRes.Truncated
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user