From 16abd7e07c6903b8167a17495f11c5d622722640 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 30 Nov 2021 14:18:48 -0800 Subject: [PATCH] ipn/ipnlocal: fix Content-Length in DoH DNS proxy response Updates #1713 Change-Id: I912d90383b751ad97b32bcec55e8fedbcf4d3db8 Signed-off-by: Brad Fitzpatrick --- ipn/ipnlocal/peerapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipn/ipnlocal/peerapi.go b/ipn/ipnlocal/peerapi.go index 906a3a822..6d90f94a3 100644 --- a/ipn/ipnlocal/peerapi.go +++ b/ipn/ipnlocal/peerapi.go @@ -849,7 +849,7 @@ func (h *peerAPIHandler) handleDNSQuery(w http.ResponseWriter, r *http.Request) return } w.Header().Set("Content-Type", "application/dns-message") - w.Header().Set("Content-Length", strconv.Itoa(len(q))) + w.Header().Set("Content-Length", strconv.Itoa(len(res))) w.Write(res) }