aboutsummaryrefslogtreecommitdiff
path: root/plugin/erratic/erratic.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-05-01 21:04:06 +0100
committerGravatar GitHub <noreply@github.com> 2018-05-01 21:04:06 +0100
commit5735292406caf7d490853cee37f12126a8b7a4dc (patch)
tree119996d193d3cbf893992ad9b9ddfbba4caf342c /plugin/erratic/erratic.go
parentc48531bb35fa1bb5f9e41a00d98794ea1978f01e (diff)
downloadcoredns-5735292406caf7d490853cee37f12126a8b7a4dc.tar.gz
coredns-5735292406caf7d490853cee37f12126a8b7a4dc.tar.zst
coredns-5735292406caf7d490853cee37f12126a8b7a4dc.zip
Do Compress only when need in request.Scrub (#1760)
* Remove Compress by default Set Compress = true in Scrub only when the message doesn not fit the advertized buffer. Doing compression is expensive, so try to avoid it. Master vs this branch pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-2 50000 24774 ns/op pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-2 100000 21960 ns/op * and make it compile
Diffstat (limited to 'plugin/erratic/erratic.go')
-rw-r--r--plugin/erratic/erratic.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/plugin/erratic/erratic.go b/plugin/erratic/erratic.go
index f763f8a67..c9cc87459 100644
--- a/plugin/erratic/erratic.go
+++ b/plugin/erratic/erratic.go
@@ -45,7 +45,6 @@ func (e *Erratic) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
m := new(dns.Msg)
m.SetReply(r)
- m.Compress = true
m.Authoritative = true
if trunc {
m.Truncated = true