From a331bbb3ae7b75025850f67a5758812fddfe0ecd Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 3 Feb 2021 00:40:31 -0800 Subject: [PATCH] filer: should return 204 on DELETE to nonexistent file related to https://github.com/chrislusf/seaweedfs/issues/1776 https://github.com/chrislusf/seaweedfs/issues/1160 --- weed/server/filer_server_handlers_write.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 9131b042b..6f33e8494 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -95,7 +95,7 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) { glog.V(1).Infoln("deleting", objectPath, ":", err.Error()) httpStatus := http.StatusInternalServerError if err == filer_pb.ErrNotFound { - httpStatus = http.StatusNotFound + httpStatus = http.StatusNoContent } writeJsonError(w, r, httpStatus, err) return