feat: add partial update support (#331)

Co-authored-by: Henrique Dias <[email protected]>
This commit is contained in:
Janlay Wu
2026-06-27 10:00:57 +02:00
committed by GitHub
co-authored by Henrique Dias
parent 71fce1a29e
commit 3ddd9182f9
7 changed files with 958 additions and 5 deletions
+10
View File
@@ -176,6 +176,16 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}
if r.Method == "OPTIONS" {
user.handleOptions(w, r, req.path)
return
}
if r.Method == "PATCH" || (r.Method == "PUT" && r.Header.Get("Content-Range") != "") {
user.handlePartialUpdate(w, r, req.path)
return
}
// Runs the WebDAV.
user.ServeHTTP(w, r)
}