- Cleaup the code

- Add delete button to webdav ui
- Some other bug fixes here and there
This commit is contained in:
Mukhtar Akere
2025-05-15 02:42:38 +01:00
parent 690d7668c1
commit b984697fe3
16 changed files with 332 additions and 297 deletions

View File

@@ -13,7 +13,11 @@ import (
)
var builderPool = sync.Pool{
New: func() interface{} { return stringbuf.New("") },
New: func() interface{} {
buf := stringbuf.New("")
return buf
},
}
func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) {
@@ -21,17 +25,10 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) {
ctx := context.WithValue(r.Context(), "metadataOnly", true)
r = r.WithContext(ctx)
// Determine depth (default "1")
depth := r.Header.Get("Depth")
if depth == "" {
depth = "1"
}
cleanPath := path.Clean(r.URL.Path)
// Build the list of entries
type entry struct {
href string
escHref string // already XML-safe + percent-escaped
escName string
size int64