dns

DNS client and server implementations using the Go project's dnsmessage package
Log | Files | Refs | README | LICENSE

commit 217f4622afa63243080fe9f0fafc00f18d7d94e5
parent 66267fa01f36cd99f4b3ac53250a1b8cbd3e2568
Author: Oliver Lowe <o@olowe.co>
Date:   Tue, 16 Nov 2021 20:28:32 +1100

Don't send an empty DoH response

forgot to put in the early return

Diffstat:
Mcmd/dohproxy/dohproxy.go | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/cmd/dohproxy/dohproxy.go b/cmd/dohproxy/dohproxy.go @@ -84,6 +84,7 @@ func dnsHandler(w http.ResponseWriter, req *http.Request) { if err != nil { log.Println("pack resolved query:", err.Error) http.Error(w, err.Error(), http.StatusInternalServerError) + return } w.Header().Add("Content-Type", dns.MediaType) if _, err := w.Write(packed); err != nil {