mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
ipn/localapi: more http status cleanup (#10995)
Use Http.StatusOk instead of 200 Updates #cleanup
This commit is contained in:
parent
a633a30711
commit
5595b61b96
@ -1991,7 +1991,7 @@ func (h *Handler) serveTKAWrapPreauthKey(w http.ResponseWriter, r *http.Request)
|
|||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(http.StatusOK)
|
||||||
w.Write([]byte(wrappedKey))
|
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)
|
http.Error(w, "network-lock disable failed: "+err.Error(), http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) serveTKALocalDisable(w http.ResponseWriter, r *http.Request) {
|
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)
|
http.Error(w, "network-lock local disable failed: "+err.Error(), http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) serveTKALog(w http.ResponseWriter, r *http.Request) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(http.StatusOK)
|
||||||
w.(http.Flusher).Flush()
|
w.(http.Flusher).Flush()
|
||||||
h.b.StreamDebugCapture(r.Context(), w)
|
h.b.StreamDebugCapture(r.Context(), w)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user