From 0b2a92d371e3a5eb7097741d1213db767f84ae60 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 15 Aug 2021 11:27:49 -0700 Subject: [PATCH] skip if http.StatusNoContent --- weed/server/common.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/server/common.go b/weed/server/common.go index 2cd2276eb..13d20d879 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -34,6 +34,10 @@ func init() { } func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) (err error) { + if httpStatus == http.StatusNoContent { + return + } + var bytes []byte if obj != nil { if r.FormValue("pretty") != "" {