mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
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
This commit is contained in:
parent
5353e38469
commit
a331bbb3ae
|
@ -95,7 +95,7 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
|
glog.V(1).Infoln("deleting", objectPath, ":", err.Error())
|
||||||
httpStatus := http.StatusInternalServerError
|
httpStatus := http.StatusInternalServerError
|
||||||
if err == filer_pb.ErrNotFound {
|
if err == filer_pb.ErrNotFound {
|
||||||
httpStatus = http.StatusNotFound
|
httpStatus = http.StatusNoContent
|
||||||
}
|
}
|
||||||
writeJsonError(w, r, httpStatus, err)
|
writeJsonError(w, r, httpStatus, err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue