diff --git a/server/webdav/webdav.go b/server/webdav/webdav.go index 9f856e4fbd7..3485fc80323 100644 --- a/server/webdav/webdav.go +++ b/server/webdav/webdav.go @@ -296,6 +296,9 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int, if err != nil { return status, err } + if reqPath == "" { + return http.StatusMethodNotAllowed, nil + } release, status, err := h.confirmLocks(r, reqPath, "") if err != nil { return status, err