From 60abeb027b700e7fa40aa815da8a08383372aca7 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Fri, 11 Feb 2022 12:32:00 -0800 Subject: [PATCH] cmd/derper: stop setting content header in handleBootstrapDNS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No one really cares. Its cost outweighs its usefulness. name old time/op new time/op delta HandleBootstrapDNS-10 105ns ± 4% 65ns ± 2% -37.68% (p=0.000 n=15+14) name old alloc/op new alloc/op delta HandleBootstrapDNS-10 416B ± 0% 0B -100.00% (p=0.000 n=15+15) name old allocs/op new allocs/op delta HandleBootstrapDNS-10 3.00 ± 0% 0.00 -100.00% (p=0.000 n=15+15) Signed-off-by: Josh Bleecher Snyder --- cmd/derper/bootstrap_dns.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/derper/bootstrap_dns.go b/cmd/derper/bootstrap_dns.go index 8c6b9cfed..c657b3591 100644 --- a/cmd/derper/bootstrap_dns.go +++ b/cmd/derper/bootstrap_dns.go @@ -57,7 +57,6 @@ func refreshBootstrapDNS() { func handleBootstrapDNS(w http.ResponseWriter, r *http.Request) { bootstrapDNSRequests.Add(1) - w.Header().Set("Content-Type", "application/json") j, _ := dnsCache.Load().([]byte) w.Write(j) }