From 5595b61b96aac4558525d4fc56362dd36cc42616 Mon Sep 17 00:00:00 2001 From: kari-ts <135075563+kari-ts@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:34:41 -0800 Subject: [PATCH] ipn/localapi: more http status cleanup (#10995) Use Http.StatusOk instead of 200 Updates #cleanup --- ipn/localapi/localapi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipn/localapi/localapi.go b/ipn/localapi/localapi.go index 4559a3997..40ac17639 100644 --- a/ipn/localapi/localapi.go +++ b/ipn/localapi/localapi.go @@ -1991,7 +1991,7 @@ func (h *Handler) serveTKAWrapPreauthKey(w http.ResponseWriter, r *http.Request) http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) w.Write([]byte(wrappedKey)) } @@ -2045,7 +2045,7 @@ func (h *Handler) serveTKADisable(w http.ResponseWriter, r *http.Request) { http.Error(w, "network-lock disable failed: "+err.Error(), http.StatusBadRequest) return } - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) } func (h *Handler) serveTKALocalDisable(w http.ResponseWriter, r *http.Request) { @@ -2069,7 +2069,7 @@ func (h *Handler) serveTKALocalDisable(w http.ResponseWriter, r *http.Request) { http.Error(w, "network-lock local disable failed: "+err.Error(), http.StatusBadRequest) return } - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) } func (h *Handler) serveTKALog(w http.ResponseWriter, r *http.Request) { @@ -2391,7 +2391,7 @@ func (h *Handler) serveDebugCapture(w http.ResponseWriter, r *http.Request) { return } - w.WriteHeader(200) + w.WriteHeader(http.StatusOK) w.(http.Flusher).Flush() h.b.StreamDebugCapture(r.Context(), w) }