fix(webdav): return 404 if error happened on `handlePropfind`

pull/4522/head v3.20.1
Andy Hsu 2023-07-05 13:52:21 +08:00
parent 4fabc27366
commit 8bdc67ec3d
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
status, err = h.handleUnlock(brw, r)
case "PROPFIND":
status, err = h.handlePropfind(brw, r)
// if there is a error for PROPFIND, we should be as an empty folder to the client
if err != nil {
status = http.StatusNotFound
}
case "PROPPATCH":
status, err = h.handleProppatch(brw, r)
}