Browse Source

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
pull/1778/head
Chris Lu 4 years ago
parent
commit
a331bbb3ae
  1. 2
      weed/server/filer_server_handlers_write.go

2
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

Loading…
Cancel
Save